docs: use unwrap
in example to extract from Option
This commit is contained in:
parent
6617f1209c
commit
b00cac307a
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ pub enum Color {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// let color1 = Color::from_hex("#c0ffee");
|
||||
/// let color1 = Color::from_hex("#c0ffee").unwrap();
|
||||
/// let color2 = Color::Rgb(192, 255, 238);
|
||||
///
|
||||
/// assert_eq!(color1, color2);
|
||||
|
|
Loading…
Add table
Reference in a new issue