@@ -44,47 +44,47 @@ impl salsa::InternKey for InternKey {
4444#[ test]
4545fn test_intern1 ( ) {
4646 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 ( ) ) ;
5151
5252 assert_eq ! ( foo0, foo1) ;
5353 assert_eq ! ( bar0, bar1) ;
5454 assert_ne ! ( foo0, bar0) ;
5555
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) ) ;
5858}
5959
6060#[ test]
6161fn test_intern2 ( ) {
6262 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 ( ) ) ;
6767
6868 assert_eq ! ( foo0, foo1) ;
6969 assert_eq ! ( bar0, bar1) ;
7070 assert_ne ! ( foo0, bar0) ;
7171
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) ) ;
7474}
7575
7676#[ test]
7777fn test_intern_key ( ) {
7878 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 ( ) ) ;
8383
8484 assert_eq ! ( foo0, foo1) ;
8585 assert_eq ! ( bar0, bar1) ;
8686 assert_ne ! ( foo0, bar0) ;
8787
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) ) ;
9090}
0 commit comments