diff --git a/src/lazy/mod.rs b/src/lazy/mod.rs index 1b235c6..2fecfa8 100644 --- a/src/lazy/mod.rs +++ b/src/lazy/mod.rs @@ -313,7 +313,7 @@ pub struct SourceMapIndex<'a> { sections: Vec>, } -pub fn decode(slice: &[u8]) -> Result { +pub fn decode(slice: &[u8]) -> Result> { let content = strip_junk_header(slice)?; let rsm: RawSourceMap = serde_json::from_slice(content)?; diff --git a/src/ram_bundle.rs b/src/ram_bundle.rs index 8b071e0..d7bd1c0 100644 --- a/src/ram_bundle.rs +++ b/src/ram_bundle.rs @@ -162,7 +162,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), @@ -185,7 +185,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, @@ -268,7 +268,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), @@ -321,7 +321,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 1f9a6a5..064bacd 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 } }