Skip to content

Commit 7308bcf

Browse files
committed
refactor(clippy): apply clippy suggestions
1 parent c28121c commit 7308bcf

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

git-cliff-core/src/embed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl BuiltinConfig {
4747
pub fn get_config(mut name: String) -> Result<String> {
4848
if !Path::new(&name)
4949
.extension()
50-
.map_or(false, |ext| ext.eq_ignore_ascii_case("toml"))
50+
.is_some_and(|ext| ext.eq_ignore_ascii_case("toml"))
5151
{
5252
name = format!("{name}.toml");
5353
}

git-cliff-core/src/remote/bitbucket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ impl TryFrom<Remote> for BitbucketClient {
180180
}
181181

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

186186
fn remote(&self) -> Remote {
187187
self.remote.clone()

git-cliff-core/src/remote/gitea.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ impl TryFrom<Remote> for GiteaClient {
144144
}
145145

146146
impl RemoteClient for GiteaClient {
147-
const API_URL: &str = "https://codeberg.org";
148-
const API_URL_ENV: &str = "GITEA_API_URL";
147+
const API_URL: &'static str = "https://codeberg.org";
148+
const API_URL_ENV: &'static str = "GITEA_API_URL";
149149

150150
fn remote(&self) -> Remote {
151151
self.remote.clone()

git-cliff-core/src/remote/github.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ impl TryFrom<Remote> for GitHubClient {
159159
}
160160

161161
impl RemoteClient for GitHubClient {
162-
const API_URL: &str = "https://api.github.com";
163-
const API_URL_ENV: &str = "GITHUB_API_URL";
162+
const API_URL: &'static str = "https://api.github.com";
163+
const API_URL_ENV: &'static str = "GITHUB_API_URL";
164164

165165
fn remote(&self) -> Remote {
166166
self.remote.clone()

git-cliff-core/src/remote/gitlab.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ impl TryFrom<Remote> for GitLabClient {
241241
}
242242

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

247247
fn remote(&self) -> Remote {
248248
self.remote.clone()

0 commit comments

Comments
 (0)