]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch17-oop/listing-17-15/src/main.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / doc / book / listings / ch17-oop / listing-17-15 / src / main.rs
1 use blog::Post;
2
3 fn main() {
4 let mut post = Post::new();
5
6 post.add_text("I ate a salad for lunch today");
7 assert_eq!("", post.content());
8
9 post.request_review();
10 assert_eq!("", post.content());
11
12 post.approve();
13 assert_eq!("I ate a salad for lunch today", post.content());
14 }