diff --git a/git-cliff-core/src/embed.rs b/git-cliff-core/src/embed.rs index 79450df..1d1ee03 100644 --- a/git-cliff-core/src/embed.rs +++ b/git-cliff-core/src/embed.rs @@ -47,7 +47,7 @@ impl BuiltinConfig { pub fn get_config(mut name: String) -> Result { 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"); } diff --git a/git-cliff-core/src/remote/bitbucket.rs b/git-cliff-core/src/remote/bitbucket.rs index d12e9d7..a25c747 100644 --- a/git-cliff-core/src/remote/bitbucket.rs +++ b/git-cliff-core/src/remote/bitbucket.rs @@ -180,8 +180,8 @@ impl TryFrom 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() diff --git a/git-cliff-core/src/remote/gitea.rs b/git-cliff-core/src/remote/gitea.rs index c7a6b09..1cb65d7 100644 --- a/git-cliff-core/src/remote/gitea.rs +++ b/git-cliff-core/src/remote/gitea.rs @@ -144,8 +144,8 @@ impl TryFrom 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() diff --git a/git-cliff-core/src/remote/github.rs b/git-cliff-core/src/remote/github.rs index 2548844..f69ef19 100644 --- a/git-cliff-core/src/remote/github.rs +++ b/git-cliff-core/src/remote/github.rs @@ -159,8 +159,8 @@ impl TryFrom 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() diff --git a/git-cliff-core/src/remote/gitlab.rs b/git-cliff-core/src/remote/gitlab.rs index 78c9bde..1e23870 100644 --- a/git-cliff-core/src/remote/gitlab.rs +++ b/git-cliff-core/src/remote/gitlab.rs @@ -241,8 +241,8 @@ impl TryFrom 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()