trpl-zh-cn/listings/ch17-oop/listing-17-21/src/main.rs
2022-02-06 16:43:51 +08:00

14 lines
253 B
Rust
Executable File

use blog::Post;
fn main() {
let mut post = Post::new();
post.add_text("I ate a salad for lunch today");
let post = post.request_review();
let post = post.approve();
assert_eq!("I ate a salad for lunch today", post.content());
}