Skip to content

Commit

Permalink
Rollup merge of rust-lang#66346 - linkmauve:try-in-docstring, r=Dylan…
Browse files Browse the repository at this point in the history
…-DPC

Replace .unwrap() with ? in std::os::unix::net

As people like to copy examples, this gives them good habits.
  • Loading branch information
Centril authored Dec 1, 2019
2 parents 4007d4e + be18a22 commit 507a020
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 156 deletions.
6 changes: 4 additions & 2 deletions src/libstd/sys/unix/ext/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
//! use std::fs::File;
//! use std::os::unix::prelude::*;
//!
//! fn main() {
//! let f = File::create("foo.txt").unwrap();
//! fn main() -> std::io::Result<()> {
//! let f = File::create("foo.txt")?;
//! let fd = f.as_raw_fd();
//!
//! // use fd with native unix bindings
//!
//! Ok(())
//! }
//! ```
Expand Down
Loading

0 comments on commit 507a020

Please sign in to comment.