Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
micprog committed Aug 21, 2024
1 parent 5464908 commit 405fe0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/cmd/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub fn run(sess: &Session, path: &Path, matches: &ArgMatches) -> Result<()> {
.arg("add")
.arg("origin")
.arg(
&sess
sess
.dependency(sess.dependency_with_name(dep)?)
.source
.to_str(),
Expand Down
10 changes: 2 additions & 8 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,10 +882,7 @@ impl Validate for PartialVendorPackage {
})?,
None => return Err(Error::new("external import upstream missing")),
},
mapping: match self.mapping {
Some(mapping) => mapping,
None => Vec::new(),
},
mapping: self.mapping.unwrap_or_default(),
patch_dir: match self.patch_dir {
Some(patch_dir) => Some(env_path_from_string(patch_dir)?),
None => None,
Expand All @@ -895,10 +892,7 @@ impl Validate for PartialVendorPackage {
None => vec![String::from("")],
},
exclude_from_upstream: {
let mut excl = match self.exclude_from_upstream {
Some(exclude_from_upstream) => exclude_from_upstream,
None => Vec::new(),
};
let mut excl = self.exclude_from_upstream.unwrap_or_default();
excl.push(String::from(".git"));
excl
},
Expand Down

0 comments on commit 405fe0c

Please sign in to comment.