Skip to content

Commit

Permalink
ty clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamGallagher737 committed Jul 15, 2024
1 parent 1fe2bec commit f7d7d6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/check_crate_updates/src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ impl Manifest {
self.0
.get("dependencies")
.and_then(|dep| dep.get(name))
.map(|dep| Dependency(dep))
.map(Dependency)
}

/// Gets the dependency mutably from the manifest if it exists
pub fn get_dependency_mut(&mut self, name: &str) -> Option<DependencyMut> {
self.0
.get_mut("dependencies")
.and_then(|dep| dep.get_mut(name))
.map(|dep| DependencyMut(dep))
.map(DependencyMut)
}

/// Gets the names of all the dependencies from the manifest
pub fn get_dependency_names<'a>(&'a self) -> Option<impl Iterator<Item = &'a str>> {
pub fn get_dependency_names(&self) -> Option<impl Iterator<Item = &'_ str>> {
self.0
.get("dependencies")
.and_then(|item| item.as_table())
Expand Down Expand Up @@ -70,7 +70,7 @@ impl FromStr for Manifest {
type Err = toml_edit::TomlError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
s.parse::<toml_edit::DocumentMut>().map(|doc| Manifest(doc))
s.parse::<toml_edit::DocumentMut>().map(Manifest)
}
}

Expand Down

0 comments on commit f7d7d6a

Please sign in to comment.