diff --git a/src/engine_api.rs b/src/engine_api.rs index 973b1a5c..e73accdc 100644 --- a/src/engine_api.rs +++ b/src/engine_api.rs @@ -1074,7 +1074,7 @@ impl Engine { Some(Ok(module_ast)) => { collect_imports(&module_ast, &mut resolver, &mut imports) } - Some(err @ Err(_)) => return err, + Some(err) => return err, None => (), } diff --git a/src/module/resolvers/file.rs b/src/module/resolvers/file.rs index ab3800e6..d933b028 100644 --- a/src/module/resolvers/file.rs +++ b/src/module/resolvers/file.rs @@ -342,7 +342,7 @@ impl ModuleResolver for FileModuleResolver { ast.set_source(path); Some(Ok(ast)) } - err @ Err(_) => Some(err), + err => Some(err), } } } diff --git a/src/packages/iter_basic.rs b/src/packages/iter_basic.rs index 42a984b8..e09d8923 100644 --- a/src/packages/iter_basic.rs +++ b/src/packages/iter_basic.rs @@ -5,7 +5,7 @@ use std::ops::Range; use std::prelude::v1::*; #[cfg(not(feature = "unchecked"))] -use num_traits::{CheckedAdd, CheckedSub}; +use num_traits::{CheckedAdd as Add, CheckedSub as Sub}; #[cfg(feature = "unchecked")] use std::ops::{Add, Sub}; @@ -14,11 +14,11 @@ use std::ops::{Add, Sub}; #[derive(Debug, Clone, Copy, Hash, Eq, PartialEq)] struct StepRange(T, T, T) where - T: Variant + Copy + PartialOrd + CheckedAdd + CheckedSub; + T: Variant + Copy + PartialOrd + Add + Sub; impl StepRange where - T: Variant + Copy + PartialOrd + CheckedAdd + CheckedSub, + T: Variant + Copy + PartialOrd + Add + Sub, { pub fn new(from: T, to: T, step: T) -> Result> { #[cfg(not(feature = "unchecked"))] @@ -43,7 +43,7 @@ where impl Iterator for StepRange where - T: Variant + Copy + PartialOrd + CheckedAdd + CheckedSub, + T: Variant + Copy + PartialOrd + Add + Sub, { type Item = T;