Skip to content

Commit a224232

Browse files
authored
Merge pull request #848 from ZuseZ4/fix_CI
Fix ci
2 parents e808e2b + 4f0cd9b commit a224232

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo: required
44
dist: trusty
55
matrix:
66
include:
7-
- rust: 1.37.0
7+
- rust: 1.42.0
88
env:
99
- FEATURES='test docs'
1010
- RUSTFLAGS='-D warnings'

src/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ impl ShapeError {
3333
///
3434
/// This enumeration is not exhaustive. The representation of the enum
3535
/// is not guaranteed.
36+
#[non_exhaustive]
3637
#[derive(Copy, Clone, Debug)]
3738
pub enum ErrorKind {
3839
/// incompatible shape
@@ -47,8 +48,6 @@ pub enum ErrorKind {
4748
Unsupported,
4849
/// overflow when computing offset, length, etc.
4950
Overflow,
50-
#[doc(hidden)]
51-
__Incomplete,
5251
}
5352

5453
#[inline(always)]
@@ -81,7 +80,6 @@ impl fmt::Display for ShapeError {
8180
ErrorKind::OutOfBounds => "out of bounds indexing",
8281
ErrorKind::Unsupported => "unsupported operation",
8382
ErrorKind::Overflow => "arithmetic overflow",
84-
ErrorKind::__Incomplete => "this error variant is not in use",
8583
};
8684
write!(f, "ShapeError/{:?}: {}", self.kind(), description)
8785
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//! needs matching memory layout to be efficient (with some exceptions).
6262
//! + Efficient floating point matrix multiplication even for very large
6363
//! matrices; can optionally use BLAS to improve it further.
64-
//! - **Requires Rust 1.37 or later**
64+
//! - **Requires Rust 1.42 or later**
6565
//!
6666
//! ## Crate Feature Flags
6767
//!

src/slice.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,12 @@ copy_and_clone! {SliceOrIndex}
110110
impl SliceOrIndex {
111111
/// Returns `true` if `self` is a `Slice` value.
112112
pub fn is_slice(&self) -> bool {
113-
match self {
114-
SliceOrIndex::Slice { .. } => true,
115-
_ => false,
116-
}
113+
matches!(self, SliceOrIndex::Slice { .. })
117114
}
118115

119116
/// Returns `true` if `self` is an `Index` value.
120117
pub fn is_index(&self) -> bool {
121-
match self {
122-
SliceOrIndex::Index(_) => true,
123-
_ => false,
124-
}
118+
matches!(self, SliceOrIndex::Index(_))
125119
}
126120

127121
/// Returns a new `SliceOrIndex` with the given step size (multiplied with

src/stacking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ where
165165
let mut res = Array::from_shape_vec(res_dim, v)?;
166166

167167
res.axis_iter_mut(axis)
168-
.zip(arrays.into_iter())
168+
.zip(arrays.iter())
169169
.for_each(|(mut assign_view, array)| {
170170
assign_view.assign(&array);
171171
});

0 commit comments

Comments
 (0)