From 892963e3bb5dd6fd8fc302c4c767e0e9d519700a Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Fri, 18 Dec 2020 16:59:21 +0000 Subject: [PATCH] Swap out `Try` for `Result` --- library/core/src/array/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 7ce77dc5c5827..a6b0e3280b1d4 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -12,7 +12,7 @@ use crate::convert::{Infallible, TryFrom}; use crate::fmt; use crate::hash::{self, Hash}; use crate::marker::Unsize; -use crate::ops::{Index, IndexMut, Try}; +use crate::ops::{Index, IndexMut}; use crate::slice::{Iter, IterMut}; mod iter; @@ -480,10 +480,9 @@ impl [T; N] { /// assert!(b.is_err()); /// ``` #[unstable(feature = "array_try_map", issue = "79711")] - pub fn try_map(self, mut f: F) -> Result<[U; N], E> + pub fn try_map(self, mut f: F) -> Result<[U; N], E> where - F: FnMut(T) -> R, - R: Try, + F: FnMut(T) -> Result, { use crate::mem::MaybeUninit; struct Guard {