]> git.lizzy.rs Git - rust.git/blobdiff - library/core/tests/any.rs
Add a dedicated length-prefixing method to `Hasher`
[rust.git] / library / core / tests / any.rs
index b36d6f0d4040598b0ea86718d0489681d8c19781..eccddcbbf59fe02c62b3ad871fd241e48395df34 100644 (file)
@@ -46,12 +46,12 @@ fn any_downcast_ref() {
 
     match a.downcast_ref::<usize>() {
         Some(&5) => {}
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match a.downcast_ref::<Test>() {
         None => {}
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 }
 
@@ -69,7 +69,7 @@ fn any_downcast_mut() {
             assert_eq!(*x, 5);
             *x = 612;
         }
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match b_r.downcast_mut::<usize>() {
@@ -77,27 +77,27 @@ fn any_downcast_mut() {
             assert_eq!(*x, 7);
             *x = 413;
         }
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match a_r.downcast_mut::<Test>() {
         None => (),
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match b_r.downcast_mut::<Test>() {
         None => (),
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match a_r.downcast_mut::<usize>() {
         Some(&mut 612) => {}
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 
     match b_r.downcast_mut::<usize>() {
         Some(&mut 413) => {}
-        x => panic!("Unexpected value {:?}", x),
+        x => panic!("Unexpected value {x:?}"),
     }
 }