Skip to content

Commit

Permalink
Remove ? from the Uuid::new_v4 example
Browse files Browse the repository at this point in the history
It seems Uuid no longer implements `Try`, which makes Uuid::new_v4()? fail compilation. The `?`
was removed from the README in commit 8962ef6 but 
was not removed from the rust-doc in lib.rs.

Additionally, this also hides `#[cfg(feature = "v4")]` from the docs.
  • Loading branch information
Tehnix committed Jul 24, 2021
1 parent 3b5f6ad commit df0dc49
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@
//!
//! use uuid::Uuid;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! #[cfg(feature = "v4")] {
//! let my_uuid = Uuid::new_v4()?;
//! println!("{}", my_uuid);
//! }
//! Ok(())
//! fn main() {
//! # #[cfg(feature = "v4")] {
//! let my_uuid = Uuid::new_v4();
//! println!("{}", my_uuid);
//! # }
//! }
//! ```
//!
Expand Down

0 comments on commit df0dc49

Please sign in to comment.