如果需要满足运行输出的结果,则需要使用 println!

pull/385/head
余小磊 3 years ago committed by GitHub
parent 751574adc7
commit 21304427ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,8 +69,8 @@ fn main() {
let post = Post{title: "Rust语言简介".to_string(),author: "Sunface".to_string(), content: "Rust棒极了!".to_string()};
let weibo = Weibo{username: "sunface".to_string(),content: "好像微博没Tweet好用".to_string()};
post.summarize();
weibo.summarize();
println!("{}",post.summarize());
println!("{}",weibo.summarize());
}
```

Loading…
Cancel
Save