Skip to content

Commit

Permalink
Fix alloc::test::test_show
Browse files Browse the repository at this point in the history
  • Loading branch information
CDirkx committed Apr 21, 2021
1 parent fdae757 commit fccc75c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/alloc/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit fccc75c

Please sign in to comment.