X-Git-Url: https://piware.de/gitweb/?p=learn-rust.git;a=blobdiff_plain;f=concepts%2Fsrc%2Fmain.rs;fp=concepts%2Fsrc%2Fmain.rs;h=20826216bbd4c0ec5a0e8e3cec408f507b28140b;hp=3e9bbbd0cd042234615d20dd563baf6278258464;hb=1962a5412d16f34c738e9f81bb5271da043a7505;hpb=6cf2fd87f634bb24ca0ab801a8ba3fbfff1ac418 diff --git a/concepts/src/main.rs b/concepts/src/main.rs index 3e9bbbd..2082621 100644 --- a/concepts/src/main.rs +++ b/concepts/src/main.rs @@ -262,7 +262,13 @@ fn test_dyn_traits() { post.request_review(); assert_eq!("", post.content()); - post.approve(); + post.approve(); // first + assert_eq!("", post.content()); + + post.approve(); // second + assert_eq!(text, post.content()); + + post.reject(); // no-op assert_eq!(text, post.content()); }