From 2a5c31ca51a5d7c1c3d580e1214094dc2ef5d8fe Mon Sep 17 00:00:00 2001 From: David Sinclair Date: Sun, 20 Oct 2019 22:22:33 +0200 Subject: [PATCH] Rename the default argument 'def' to 'default' Fixes: #65492 --- src/libcore/option.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 09d4076c7fbc7..9eb29eae7f75a 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -395,10 +395,10 @@ impl Option { /// ``` #[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, } }