Skip to content

Commit c49a60e

Browse files
committed
clippy: enable unnecessary_literal_bound lint
1 parent 94d2c04 commit c49a60e

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ ptr_cast_constness = "warn"
146146
ref_as_ptr = "warn"
147147
semicolon_if_nothing_returned = "warn"
148148
uninlined_format_args = "warn"
149+
unnecessary_literal_bound = "warn"
149150
unused_trait_names = "warn"
150151
use_self = "warn"
151152
useless_conversion = "warn"

cli/examples/custom-backend/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl JitBackend {
114114

115115
#[async_trait]
116116
impl Backend for JitBackend {
117-
fn name(&self) -> &str {
117+
fn name(&self) -> &'static str {
118118
"jit"
119119
}
120120

lib/src/gpg_signing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl GpgBackend {
176176
}
177177

178178
impl SigningBackend for GpgBackend {
179-
fn name(&self) -> &str {
179+
fn name(&self) -> &'static str {
180180
"gpg"
181181
}
182182

@@ -264,7 +264,7 @@ impl GpgsmBackend {
264264
}
265265

266266
impl SigningBackend for GpgsmBackend {
267-
fn name(&self) -> &str {
267+
fn name(&self) -> &'static str {
268268
"gpgsm"
269269
}
270270

lib/src/ssh_signing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl SshBackend {
210210
}
211211

212212
impl SigningBackend for SshBackend {
213-
fn name(&self) -> &str {
213+
fn name(&self) -> &'static str {
214214
"ssh"
215215
}
216216

lib/src/test_signing_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct TestSigningBackend;
3030
const PREFIX: &str = "--- JJ-TEST-SIGNATURE ---\nKEY: ";
3131

3232
impl SigningBackend for TestSigningBackend {
33-
fn name(&self) -> &str {
33+
fn name(&self) -> &'static str {
3434
"test"
3535
}
3636

lib/testutils/src/test_backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl Debug for TestBackend {
168168

169169
#[async_trait]
170170
impl Backend for TestBackend {
171-
fn name(&self) -> &str {
171+
fn name(&self) -> &'static str {
172172
"test"
173173
}
174174

0 commit comments

Comments
 (0)