Skip to content

Commit 5166660

Browse files
author
fmoko
authored
Merge pull request #365 from sjmann/generics-2-fix
2 parents 10967bc + 964c974 commit 5166660

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

exercises/generics/generics2.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Rewrite it using generics so that it supports wrapping ANY type.
33

44
// I AM NOT DONE
5-
struct Wrapper<u32> {
5+
struct Wrapper {
66
value: u32
77
}
88

9-
impl<u32> Wrapper<u32> {
9+
impl Wrapper {
1010
pub fn new(value: u32) -> Self {
1111
Wrapper { value }
1212
}
@@ -23,8 +23,6 @@ mod tests {
2323

2424
#[test]
2525
fn store_str_in_wrapper() {
26-
// TODO: Delete this assert and uncomment the one below once you have finished the exercise.
27-
assert!(false);
28-
// assert_eq!(Wrapper::new("Foo").value, "Foo");
26+
assert_eq!(Wrapper::new("Foo").value, "Foo");
2927
}
3028
}

0 commit comments

Comments
 (0)