55 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
66 */
77
8- use std:: borrow:: Cow ;
9-
10- use godot:: builtin:: { GString , StringName } ;
8+ use godot:: builtin:: { CowStr , GString , StringName } ;
119use godot:: meta:: ClassId ;
1210use godot:: obj:: bounds:: implement_godot_bounds;
1311use godot:: obj:: GodotClass ;
@@ -48,7 +46,7 @@ fn class_name_godotclass() {
4846 assert_eq ! ( a. to_string( ) , "A" ) ;
4947 assert_eq ! ( a. to_gstring( ) , GString :: from( "A" ) ) ;
5048 assert_eq ! ( a. to_string_name( ) , StringName :: from( "A" ) ) ;
51- assert_eq ! ( a. to_cow_str( ) , Cow :: < ' static , str > :: Owned ( "A" . to_string( ) ) ) ;
49+ assert_eq ! ( a. to_cow_str( ) , CowStr :: Owned ( "A" . to_string( ) ) ) ;
5250}
5351
5452#[ cfg( since_api = "4.4" ) ]
@@ -63,10 +61,7 @@ fn class_name_godotclass_unicode() {
6361 assert_eq ! ( a. to_string( ) , "统一码" ) ;
6462 assert_eq ! ( a. to_gstring( ) , GString :: from( "统一码" ) ) ;
6563 assert_eq ! ( a. to_string_name( ) , StringName :: from( "统一码" ) ) ;
66- assert_eq ! (
67- a. to_cow_str( ) ,
68- Cow :: <' static , str >:: Owned ( "统一码" . to_string( ) )
69- ) ;
64+ assert_eq ! ( a. to_cow_str( ) , CowStr :: Owned ( "统一码" . to_string( ) ) ) ;
7065
7166 let b = ClassId :: __dynamic ( "统一码" ) ;
7267 assert_eq ! ( a, b) ;
0 commit comments