Skip to content

Commit

Permalink
refactor(clippy): apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Nov 19, 2024
1 parent c28121c commit 7308bcf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion git-cliff-core/src/embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl BuiltinConfig {
pub fn get_config(mut name: String) -> Result<String> {
if !Path::new(&name)
.extension()
.map_or(false, |ext| ext.eq_ignore_ascii_case("toml"))
.is_some_and(|ext| ext.eq_ignore_ascii_case("toml"))
{
name = format!("{name}.toml");
}
Expand Down
4 changes: 2 additions & 2 deletions git-cliff-core/src/remote/bitbucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ impl TryFrom<Remote> for BitbucketClient {
}

impl RemoteClient for BitbucketClient {
const API_URL: &str = "https://api.bitbucket.org/2.0/repositories";
const API_URL_ENV: &str = "BITBUCKET_API_URL";
const API_URL: &'static str = "https://api.bitbucket.org/2.0/repositories";
const API_URL_ENV: &'static str = "BITBUCKET_API_URL";

fn remote(&self) -> Remote {
self.remote.clone()
Expand Down
4 changes: 2 additions & 2 deletions git-cliff-core/src/remote/gitea.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ impl TryFrom<Remote> for GiteaClient {
}

impl RemoteClient for GiteaClient {
const API_URL: &str = "https://codeberg.org";
const API_URL_ENV: &str = "GITEA_API_URL";
const API_URL: &'static str = "https://codeberg.org";
const API_URL_ENV: &'static str = "GITEA_API_URL";

fn remote(&self) -> Remote {
self.remote.clone()
Expand Down
4 changes: 2 additions & 2 deletions git-cliff-core/src/remote/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ impl TryFrom<Remote> for GitHubClient {
}

impl RemoteClient for GitHubClient {
const API_URL: &str = "https://api.github.com";
const API_URL_ENV: &str = "GITHUB_API_URL";
const API_URL: &'static str = "https://api.github.com";
const API_URL_ENV: &'static str = "GITHUB_API_URL";

fn remote(&self) -> Remote {
self.remote.clone()
Expand Down
4 changes: 2 additions & 2 deletions git-cliff-core/src/remote/gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ impl TryFrom<Remote> for GitLabClient {
}

impl RemoteClient for GitLabClient {
const API_URL: &str = "https://gitlab.com/api/v4";
const API_URL_ENV: &str = "GITLAB_API_URL";
const API_URL: &'static str = "https://gitlab.com/api/v4";
const API_URL_ENV: &'static str = "GITLAB_API_URL";

fn remote(&self) -> Remote {
self.remote.clone()
Expand Down

0 comments on commit 7308bcf

Please sign in to comment.