1
Fork 0

Rename the default argument 'def' to 'default'

Fixes: #65492
This commit is contained in:
David Sinclair 2019-10-20 22:22:33 +02:00
parent 89e645ace8
commit 2a5c31ca51

View file

@ -395,10 +395,10 @@ impl<T> Option<T> {
/// ```
#[inline]
#[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 {
Some(x) => x,
None => def,
None => default,
}
}