From 4cd3c5c72fef53c48accf5e4ee7f193c89570181 Mon Sep 17 00:00:00 2001 From: blake2-ppc Date: Sat, 21 Sep 2013 20:21:01 +0200 Subject: [PATCH] std::result: Remove function `map_opt` This function has never had any users in the tree --- src/libstd/result.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/libstd/result.rs b/src/libstd/result.rs index 3811f34cec43c..a1980aa70e344 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -366,19 +366,6 @@ impl either::AsEither for Result { } } -#[inline] -#[allow(missing_doc)] -pub fn map_opt(o_t: &Option, - op: &fn(&T) -> Result) -> Result,U> { - match *o_t { - None => Ok(None), - Some(ref t) => match op(t) { - Ok(v) => Ok(Some(v)), - Err(e) => Err(e) - } - } -} - /// Takes each element in the iterator: if it is an error, no further /// elements are taken, and the error is returned. /// Should no error occur, a vector containing the values of each Result