mirror of
https://github.com/orhun/git-cliff.git
synced 2024-11-29 04:07:32 +03:00
refactor(clippy): apply clippy suggestions
This commit is contained in:
parent
c28121c1aa
commit
7308bcf8c0
@ -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");
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user