mirror of https://github.com/hannobraun/Fornjot
Remove unused code
This commit is contained in:
parent
27b0b202c7
commit
7b2bb4a352
|
@ -13,11 +13,6 @@ pub trait ArrayExt<T, const N: usize> {
|
|||
fn try_map_ext<F, U, E>(self, f: F) -> Result<[U; N], E>
|
||||
where
|
||||
F: FnMut(T) -> Result<U, E>;
|
||||
|
||||
/// Stable replacement for `zip`
|
||||
///
|
||||
/// <https://doc.rust-lang.org/std/primitive.array.html#method.zip>
|
||||
fn zip_ext<U>(self, rhs: [U; N]) -> [(T, U); N];
|
||||
}
|
||||
|
||||
impl<T> ArrayExt<T, 2> for [T; 2] {
|
||||
|
@ -33,13 +28,6 @@ impl<T> ArrayExt<T, 2> for [T; 2] {
|
|||
let [a, b] = self.map(f);
|
||||
Ok([a?, b?])
|
||||
}
|
||||
|
||||
fn zip_ext<U>(self, rhs: [U; 2]) -> [(T, U); 2] {
|
||||
let [a, b] = self;
|
||||
let [c, d] = rhs;
|
||||
|
||||
[(a, c), (b, d)]
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> ArrayExt<T, 4> for [T; 4] {
|
||||
|
@ -55,13 +43,6 @@ impl<T> ArrayExt<T, 4> for [T; 4] {
|
|||
let [a, b, c, d] = self.map(f);
|
||||
Ok([a?, b?, c?, d?])
|
||||
}
|
||||
|
||||
fn zip_ext<U>(self, rhs: [U; 4]) -> [(T, U); 4] {
|
||||
let [a, b, c, d] = self;
|
||||
let [e, f, g, h] = rhs;
|
||||
|
||||
[(a, e), (b, f), (c, g), (d, h)]
|
||||
}
|
||||
}
|
||||
|
||||
/// Extension trait for arrays
|
||||
|
|
Loading…
Reference in New Issue