@@ -82,7 +82,8 @@ fn graph_with_one_edge_with_keywords() {
82
82
fn graph_with_one_attribute ( ) {
83
83
let graph = Graph :: new ( ) . with_attrs ( & [ ( "foo" , "1" ) ] ) ;
84
84
85
- let expected_attrs = HashMap :: from ( [ ( "foo" . to_string ( ) , "1" . to_string ( ) ) ] ) ;
85
+ #[ allow( clippy:: useless_conversion, reason = "allow String and &str" ) ]
86
+ let expected_attrs = HashMap :: from ( [ ( "foo" . into ( ) , "1" . into ( ) ) ] ) ;
86
87
87
88
assert ! ( graph. nodes. is_empty( ) ) ;
88
89
@@ -107,10 +108,11 @@ fn graph_with_attributes() {
107
108
108
109
let attrs = vec ! [ ( "foo" , "1" ) , ( "title" , "Testing Attrs" ) , ( "bar" , "true" ) ] ;
109
110
111
+ #[ allow( clippy:: useless_conversion, reason = "allow String and &str" ) ]
110
112
let expected_attrs = HashMap :: from ( [
111
- ( "foo" . to_string ( ) , "1" . to_string ( ) ) ,
112
- ( "title" . to_string ( ) , "Testing Attrs" . to_string ( ) ) ,
113
- ( "bar" . to_string ( ) , "true" . to_string ( ) ) ,
113
+ ( "foo" . into ( ) , "1" . into ( ) ) ,
114
+ ( "title" . into ( ) , "Testing Attrs" . into ( ) ) ,
115
+ ( "bar" . into ( ) , "true" . into ( ) ) ,
114
116
] ) ;
115
117
116
118
let graph = Graph :: new ( )
0 commit comments