implement ToString for GodotString
@@ -140,10 +140,6 @@ impl GodotString {
unsafe { Utf8String((get_api().godot_string_utf8)(&self.0)) }
}
- pub fn to_string(&self) -> String {
- self.to_utf8().to_string()
- }
-
pub fn find(&self, what: &GodotString) -> i32 {
unsafe { (get_api().godot_string_find)(&self.0, what.0) }
}
@@ -219,6 +215,12 @@ impl fmt::Debug for GodotString {
}
}
+impl ToString for GodotString {
+ fn to_string(&self) -> String {
+ self.to_utf8().to_string()
+ }
+}
+
// TODO: Is it useful to expose this type?
// Could just make it an internal detail of how to convert to a rust string.
#[doc(hidden)]
