Fix alloc::test::test_show

This commit is contained in:
Christiaan Dirkx 2021-04-21 15:45:41 +02:00
parent fdae75738b
commit fccc75cf82

View File

@ -49,17 +49,17 @@ fn test_show() {
let b = Box::new(Test) as Box<dyn Any>;
let a_str = format!("{:?}", a);
let b_str = format!("{:?}", b);
assert_eq!(a_str, "Any");
assert_eq!(b_str, "Any");
assert_eq!(a_str, "Any { .. }");
assert_eq!(b_str, "Any { .. }");
static EIGHT: usize = 8;
static TEST: Test = Test;
let a = &EIGHT as &dyn Any;
let b = &TEST as &dyn Any;
let s = format!("{:?}", a);
assert_eq!(s, "Any");
assert_eq!(s, "Any { .. }");
let s = format!("{:?}", b);
assert_eq!(s, "Any");
assert_eq!(s, "Any { .. }");
}
#[test]