Skip to content

Commit

Permalink
Merge pull request #9 from taiki-e/clippy
Browse files Browse the repository at this point in the history
Fix newly added clippy warnings
  • Loading branch information
mike-kfed authored Feb 12, 2024
2 parents 0fbdaef + 0d7f8a1 commit 40eac02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lcov2cobertura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub fn parse_lines<P: AsRef<Path>, B: BufRead>(
cov_data
.packages
.entry(package_name.clone())
.or_insert_with(Package::default)
.or_default()
.insert_class(&relative_file_name);
}
Some("DA") => {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> anyhow::Result<()> {
args.base_dir.as_path(),
&excludes,
)?
} else if args.files.get(0) == Some(&PathBuf::from("-")) {
} else if args.files.first() == Some(&PathBuf::from("-")) {
let mut input = Vec::new();
let stdin = std::io::stdin();
let mut handle = stdin.lock();
Expand All @@ -74,7 +74,7 @@ fn main() -> anyhow::Result<()> {
} else {
let filename = args
.files
.get(0)
.first()
.ok_or_else(|| anyhow::anyhow!("no filename given"))?
.to_path_buf();
lcov2xml::parse_file(filename.as_path(), args.base_dir.as_path(), &excludes)?
Expand Down

0 comments on commit 40eac02

Please sign in to comment.