diff --git a/src/ram_bundle.rs b/src/ram_bundle.rs index d37af65..2335371 100644 --- a/src/ram_bundle.rs +++ b/src/ram_bundle.rs @@ -161,7 +161,7 @@ impl<'a> RamBundle<'a> { } /// Looks up a module by ID in the bundle - pub fn get_module(&self, id: usize) -> Result> { + pub fn get_module(&self, id: usize) -> Result>> { match self.repr { RamBundleImpl::Indexed(ref indexed) => indexed.get_module(id), RamBundleImpl::Unbundle(ref file) => file.get_module(id), @@ -184,7 +184,7 @@ impl<'a> RamBundle<'a> { } } /// Returns an iterator over all modules in the bundle - pub fn iter_modules(&self) -> RamBundleModuleIter { + pub fn iter_modules(&self) -> RamBundleModuleIter<'_> { RamBundleModuleIter { range: 0..self.module_count(), ram_bundle: self, @@ -267,7 +267,7 @@ impl UnbundleRamBundle { } /// Looks up a module by ID in the bundle - pub fn get_module(&self, id: usize) -> Result> { + pub fn get_module(&self, id: usize) -> Result>> { match self.modules.get(&id) { Some(data) => Ok(Some(RamBundleModule { id, data })), None => Ok(None), @@ -320,7 +320,7 @@ impl<'a> IndexedRamBundle<'a> { } /// Looks up a module by ID in the bundle - pub fn get_module(&self, id: usize) -> Result> { + pub fn get_module(&self, id: usize) -> Result>> { if id >= self.module_count { return Err(Error::InvalidRamBundleIndex); } diff --git a/src/sourceview.rs b/src/sourceview.rs index e0ff52e..e556c8c 100644 --- a/src/sourceview.rs +++ b/src/sourceview.rs @@ -258,7 +258,7 @@ impl SourceView { } /// Returns an iterator over all lines. - pub fn lines(&self) -> Lines { + pub fn lines(&self) -> Lines<'_> { Lines { sv: self, idx: 0 } }