parent
89e645ace8
commit
2a5c31ca51
1 changed files with 2 additions and 2 deletions
|
@ -395,10 +395,10 @@ impl<T> Option<T> {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn unwrap_or(self, def: T) -> T {
|
pub fn unwrap_or(self, default: T) -> T {
|
||||||
match self {
|
match self {
|
||||||
Some(x) => x,
|
Some(x) => x,
|
||||||
None => def,
|
None => default,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue