diff --git a/src/analysis/bounds.rs b/src/analysis/bounds.rs index 786499518..30d1339f3 100644 --- a/src/analysis/bounds.rs +++ b/src/analysis/bounds.rs @@ -374,12 +374,12 @@ fn find_error_type(env: &Env, function: &Function) -> Option { .iter() .find(|param| param.direction.is_out() && param.is_error)?; if let Type::Record(_) = env.type_(error_param.typ) { - return Some( + Some( RustType::builder(env, error_param.typ) .direction(error_param.direction) .try_build() .into_string(), - ); + ) } else { None } diff --git a/src/analysis/types.rs b/src/analysis/types.rs index d04fe5759..1ef699c7a 100644 --- a/src/analysis/types.rs +++ b/src/analysis/types.rs @@ -77,7 +77,7 @@ impl IsIncomplete for Field { } } -impl<'a> IsIncomplete for &'a [Field] { +impl IsIncomplete for &[Field] { fn is_incomplete(&self, lib: &Library) -> bool { if self.is_empty() { return true; diff --git a/src/config/parameter_matchable.rs b/src/config/parameter_matchable.rs index 387f64c38..510cc620f 100644 --- a/src/config/parameter_matchable.rs +++ b/src/config/parameter_matchable.rs @@ -14,7 +14,7 @@ pub trait ParameterMatchable { fn matched_parameters(&self, parameter_name: &str) -> Vec<&Self::Parameter>; } -impl<'a, U: AsRef, T: Functionlike> ParameterMatchable for [&'a T] { +impl, T: Functionlike> ParameterMatchable for [&T] { type Parameter = U; fn matched_parameters(&self, parameter_name: &str) -> Vec<&Self::Parameter> { diff --git a/src/library.rs b/src/library.rs index 69f0b5955..c14bd4395 100644 --- a/src/library.rs +++ b/src/library.rs @@ -1356,7 +1356,7 @@ impl Library { self.namespace_mut(ns_id).versions.insert(version); } - pub fn types<'a>(&'a self) -> Box + 'a> { + pub fn types<'a>(&'a self) -> Box + 'a> { Box::new(self.namespaces.iter().enumerate().flat_map(|(ns_id, ns)| { ns.types.iter().enumerate().filter_map(move |(id, type_)| { let tid = TypeId { @@ -1372,7 +1372,7 @@ impl Library { pub fn namespace_types<'a>( &'a self, ns_id: u16, - ) -> Box + 'a> { + ) -> Box + 'a> { let ns = self.namespace(ns_id); Box::new(ns.index.values().map(move |&id| { ( diff --git a/src/xmlparser.rs b/src/xmlparser.rs index 911c47cf4..56e334b0b 100644 --- a/src/xmlparser.rs +++ b/src/xmlparser.rs @@ -142,7 +142,7 @@ impl Element { } } -impl<'a> XmlParser<'a> { +impl XmlParser<'_> { pub fn from_path(path: &Path) -> Result, String> { match File::open(path) { Err(e) => Err(format!("Can't open file \"{}\": {}", path.display(), e)),