Skip to content

Commit

Permalink
Address clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
lostatc committed Sep 17, 2024
1 parent cdea059 commit 01996b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ impl NewArgs {

options.insert(
KnownOptionName::Uris,
&self
.uris
self.uris
.iter()
.map(ToString::to_string)
.collect::<Vec<_>>(),
Expand Down
9 changes: 5 additions & 4 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt::{self, Display};
use std::str::FromStr;

use clap::ValueEnum;
Expand All @@ -13,11 +14,11 @@ pub enum SourceType {
DebSrc,
}

impl ToString for SourceType {
fn to_string(&self) -> String {
impl Display for SourceType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::Deb => String::from("deb"),
Self::DebSrc => String::from("deb-src"),
Self::Deb => f.write_str("deb"),
Self::DebSrc => f.write_str("deb-src"),
}
}
}
Expand Down

0 comments on commit 01996b5

Please sign in to comment.