@@ -44,47 +44,47 @@ impl salsa::InternKey for InternKey {
44
44
#[ test]
45
45
fn test_intern1 ( ) {
46
46
let db = Database :: default ( ) ;
47
- let foo0 = db. intern1 ( "foo" . to_string ( ) ) ;
48
- let bar0 = db. intern1 ( "bar" . to_string ( ) ) ;
49
- let foo1 = db. intern1 ( "foo" . to_string ( ) ) ;
50
- let bar1 = db. intern1 ( "bar" . to_string ( ) ) ;
47
+ let foo0 = db. intern1 ( "foo" . to_owned ( ) ) ;
48
+ let bar0 = db. intern1 ( "bar" . to_owned ( ) ) ;
49
+ let foo1 = db. intern1 ( "foo" . to_owned ( ) ) ;
50
+ let bar1 = db. intern1 ( "bar" . to_owned ( ) ) ;
51
51
52
52
assert_eq ! ( foo0, foo1) ;
53
53
assert_eq ! ( bar0, bar1) ;
54
54
assert_ne ! ( foo0, bar0) ;
55
55
56
- assert_eq ! ( "foo" . to_string ( ) , db. lookup_intern1( foo0) ) ;
57
- assert_eq ! ( "bar" . to_string ( ) , db. lookup_intern1( bar0) ) ;
56
+ assert_eq ! ( "foo" . to_owned ( ) , db. lookup_intern1( foo0) ) ;
57
+ assert_eq ! ( "bar" . to_owned ( ) , db. lookup_intern1( bar0) ) ;
58
58
}
59
59
60
60
#[ test]
61
61
fn test_intern2 ( ) {
62
62
let db = Database :: default ( ) ;
63
- let foo0 = db. intern2 ( "x" . to_string ( ) , "foo" . to_string ( ) ) ;
64
- let bar0 = db. intern2 ( "x" . to_string ( ) , "bar" . to_string ( ) ) ;
65
- let foo1 = db. intern2 ( "x" . to_string ( ) , "foo" . to_string ( ) ) ;
66
- let bar1 = db. intern2 ( "x" . to_string ( ) , "bar" . to_string ( ) ) ;
63
+ let foo0 = db. intern2 ( "x" . to_owned ( ) , "foo" . to_owned ( ) ) ;
64
+ let bar0 = db. intern2 ( "x" . to_owned ( ) , "bar" . to_owned ( ) ) ;
65
+ let foo1 = db. intern2 ( "x" . to_owned ( ) , "foo" . to_owned ( ) ) ;
66
+ let bar1 = db. intern2 ( "x" . to_owned ( ) , "bar" . to_owned ( ) ) ;
67
67
68
68
assert_eq ! ( foo0, foo1) ;
69
69
assert_eq ! ( bar0, bar1) ;
70
70
assert_ne ! ( foo0, bar0) ;
71
71
72
- assert_eq ! ( ( "x" . to_string ( ) , "foo" . to_string ( ) ) , db. lookup_intern2( foo0) ) ;
73
- assert_eq ! ( ( "x" . to_string ( ) , "bar" . to_string ( ) ) , db. lookup_intern2( bar0) ) ;
72
+ assert_eq ! ( ( "x" . to_owned ( ) , "foo" . to_owned ( ) ) , db. lookup_intern2( foo0) ) ;
73
+ assert_eq ! ( ( "x" . to_owned ( ) , "bar" . to_owned ( ) ) , db. lookup_intern2( bar0) ) ;
74
74
}
75
75
76
76
#[ test]
77
77
fn test_intern_key ( ) {
78
78
let db = Database :: default ( ) ;
79
- let foo0 = db. intern_key ( "foo" . to_string ( ) ) ;
80
- let bar0 = db. intern_key ( "bar" . to_string ( ) ) ;
81
- let foo1 = db. intern_key ( "foo" . to_string ( ) ) ;
82
- let bar1 = db. intern_key ( "bar" . to_string ( ) ) ;
79
+ let foo0 = db. intern_key ( "foo" . to_owned ( ) ) ;
80
+ let bar0 = db. intern_key ( "bar" . to_owned ( ) ) ;
81
+ let foo1 = db. intern_key ( "foo" . to_owned ( ) ) ;
82
+ let bar1 = db. intern_key ( "bar" . to_owned ( ) ) ;
83
83
84
84
assert_eq ! ( foo0, foo1) ;
85
85
assert_eq ! ( bar0, bar1) ;
86
86
assert_ne ! ( foo0, bar0) ;
87
87
88
- assert_eq ! ( "foo" . to_string ( ) , db. lookup_intern_key( foo0) ) ;
89
- assert_eq ! ( "bar" . to_string ( ) , db. lookup_intern_key( bar0) ) ;
88
+ assert_eq ! ( "foo" . to_owned ( ) , db. lookup_intern_key( foo0) ) ;
89
+ assert_eq ! ( "bar" . to_owned ( ) , db. lookup_intern_key( bar0) ) ;
90
90
}
0 commit comments