提交 1fea7519 编写于 作者: K kennytm 提交者: GitHub

Rollup merge of #47182 - aheart:master, r=steveklabnik

Equivalent example for ? operator

The example with the ? operator in the documentation for try! macro was missing file.write_all.
Now all three examples are consistent.
......@@ -330,6 +330,7 @@
/// // The prefered method of quick returning Errors
/// fn write_to_file_question() -> Result<(), MyError> {
/// let mut file = File::create("my_best_friends.txt")?;
/// file.write_all(b"This is a list of my best friends.")?;
/// Ok(())
/// }
///
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册