1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-11-25 13:22:17 +03:00

refactor(clippy): apply clippy suggestions

This commit is contained in:
Orhun Parmaksız 2024-11-19 20:47:54 +03:00
parent c28121c1aa
commit 7308bcf8c0
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90
5 changed files with 9 additions and 9 deletions

View File

@ -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");
}

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()