Make `Str`'s `clone` always clone the underlying bytes
[ldk-c-bindings] / lightning-c-bindings / src / c_types / mod.rs
index 1e88f0521e53c8ce56372278b3dcb17d3e4db3e5..12c70888b20585ef73b9872dbbb892251af09795 100644 (file)
@@ -569,7 +569,7 @@ impl Into<Str> for String {
 }
 impl Clone for Str {
        fn clone(&self) -> Self {
-               self.into_str().clone().into()
+               String::from(self.into_str()).into()
        }
 }