Skip to content

Commit 892963e

Browse files
committed
Swap out Try for Result
1 parent 0ff2022 commit 892963e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/core/src/array/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::convert::{Infallible, TryFrom};
1212
use crate::fmt;
1313
use crate::hash::{self, Hash};
1414
use crate::marker::Unsize;
15-
use crate::ops::{Index, IndexMut, Try};
15+
use crate::ops::{Index, IndexMut};
1616
use crate::slice::{Iter, IterMut};
1717

1818
mod iter;
@@ -480,10 +480,9 @@ impl<T, const N: usize> [T; N] {
480480
/// assert!(b.is_err());
481481
/// ```
482482
#[unstable(feature = "array_try_map", issue = "79711")]
483-
pub fn try_map<F, R, E, U>(self, mut f: F) -> Result<[U; N], E>
483+
pub fn try_map<F, E, U>(self, mut f: F) -> Result<[U; N], E>
484484
where
485-
F: FnMut(T) -> R,
486-
R: Try<Ok = U, Error = E>,
485+
F: FnMut(T) -> Result<U, E>,
487486
{
488487
use crate::mem::MaybeUninit;
489488
struct Guard<T, const N: usize> {

0 commit comments

Comments
 (0)