Skip to content

Commit

Permalink
style: eliminate some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Nov 9, 2024
1 parent 71486a8 commit a204482
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion crates/pacaptr-macros/src/compat_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn check_methods(file: &Path) -> anyhow::Result<BTreeMap<String, bool>> {
.map(|&method| {
// A function definition (rg. `rs`) is written as follows:
// `(async) fn rs(..) {..}`
let found = Regex::new(&format!(r#"fn\s+{method}\s*\("#))?.is_match(&contents);
let found = Regex::new(&format!(r"fn\s+{method}\s*\("))?.is_match(&contents);
Ok((method.to_owned(), found))
})
.try_collect()
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"##}
)]
#![warn(missing_docs)]
#![cfg_attr(any(test, feature = "test"), allow(clippy::wildcard_imports))]

pub mod config;
pub mod error;
Expand Down
2 changes: 1 addition & 1 deletion src/pm/apk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Apk {
#[async_trait]
impl Pm for Apk {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"apk"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/apt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Apt {
#[async_trait]
impl Pm for Apt {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"apt"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/brew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Brew {
#[async_trait]
impl Pm for Brew {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"brew"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/choco.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Choco {
#[async_trait]
impl Pm for Choco {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"choco"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/conda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Conda {
#[async_trait]
impl Pm for Conda {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"conda"
}

Expand Down
3 changes: 1 addition & 2 deletions src/pm/dnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use std::sync::LazyLock;

use async_trait::async_trait;
use futures::prelude::*;
use indoc::indoc;
use tap::prelude::*;

Expand Down Expand Up @@ -52,7 +51,7 @@ impl Dnf {
#[async_trait]
impl Pm for Dnf {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"dnf"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/emerge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Emerge {
#[async_trait]
impl Pm for Emerge {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"emerge"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/pip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Pip {
#[async_trait]
impl Pm for Pip {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"pip"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/pkcon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Pkcon {
#[async_trait]
impl Pm for Pkcon {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"pkcon"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Port {
#[async_trait]
impl Pm for Port {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"port"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/scoop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Scoop {
#[async_trait]
impl Pm for Scoop {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"scoop"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/tlmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Tlmgr {
#[async_trait]
impl Pm for Tlmgr {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"tlmgr"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/winget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Winget {
#[async_trait]
impl Pm for Winget {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"winget"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/xbps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Xbps {
#[async_trait]
impl Pm for Xbps {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"xbps"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pm/zypper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl Zypper {
#[async_trait]
impl Pm for Zypper {
/// Gets the name of the package manager.
fn name(&self) -> &str {
fn name(&self) -> &'static str {
"zypper"
}

Expand Down

0 comments on commit a204482

Please sign in to comment.