diff options
| author | blake2-ppc <blake2-ppc> | 2013-09-21 20:21:01 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-09-22 13:09:18 +0200 |
| commit | 4cd3c5c72fef53c48accf5e4ee7f193c89570181 (patch) | |
| tree | 611f60c462a9e6e0f94dbad92deed0a3eba5771a /src/libstd | |
| parent | d2b0b11aebfe3167bf41f7c6c31cf7b1e396efe7 (diff) | |
std::result: Remove function `map_opt`
This function has never had any users in the tree
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/result.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/libstd/result.rs b/src/libstd/result.rs index 3811f34cec4..a1980aa70e3 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -366,19 +366,6 @@ impl<T, E> either::AsEither<E, T> for Result<T, E> { } } -#[inline] -#[allow(missing_doc)] -pub fn map_opt<T, U: ToStr, V>(o_t: &Option<T>, - op: &fn(&T) -> Result<V,U>) -> Result<Option<V>,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 |
