Skip to content

Commit 1c79daa

Browse files
committed
Enable clippy lint unused_trait_names as "warn"
1 parent d821ccc commit 1c79daa

File tree

30 files changed

+41
-29
lines changed

30 files changed

+41
-29
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ repository = "https://github.com/SpriteOvO/spdlog-rs"
1313
license = "MIT OR Apache-2.0"
1414
keywords = ["spdlog", "log", "logging"]
1515
categories = ["development-tools::debugging"]
16+
17+
[workspace.lints.clippy]
18+
unused_trait_names = "warn"

spdlog-internal/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ license.workspace = true
99
keywords.workspace = true
1010
categories.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
nom = "8.0.0"
1417
strum = { version = "0.27.0", features = ["derive"] }

spdlog-internal/src/pattern_parser/helper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use nom::{
2-
error::{Error, ErrorKind, ParseError},
2+
error::{Error, ErrorKind, ParseError as _},
33
Err, IResult,
44
};
55

@@ -55,7 +55,7 @@ pub(crate) fn take_until_unbalanced(
5555

5656
#[cfg(test)]
5757
mod tests {
58-
use nom::{bytes::complete::tag, error::ErrorKind, sequence::delimited, Parser};
58+
use nom::{bytes::complete::tag, error::ErrorKind, sequence::delimited, Parser as _};
5959

6060
use super::*;
6161

spdlog-internal/src/pattern_parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::borrow::Cow;
22

3-
use strum::IntoEnumIterator;
3+
use strum::IntoEnumIterator as _;
44
use strum_macros::{EnumDiscriminants, EnumIter, EnumString, IntoStaticStr};
55

66
pub mod error;

spdlog-macros/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ categories.workspace = true
1212
[lib]
1313
proc-macro = true
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
proc-macro2 = "1.0.47"
1720
quote = "1.0.21"

spdlog-macros/src/normalize_forward.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::collections::HashSet;
22

33
use proc_macro2::TokenStream;
4-
use quote::{quote, ToTokens};
4+
use quote::{quote, ToTokens as _};
55
use syn::{
66
braced, bracketed,
7-
parse::{discouraged::Speculative, Parse, ParseStream},
7+
parse::{discouraged::Speculative as _, Parse, ParseStream},
88
Expr, Ident, Token,
99
};
1010

spdlog-macros/src/pattern/synthesis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::borrow::Cow;
22

33
use proc_macro2::{Span, TokenStream};
4-
use quote::ToTokens;
4+
use quote::ToTokens as _;
55
use spdlog_internal::pattern_parser::{
66
error::TemplateError,
77
parse::{Template, TemplateFormatterToken, TemplateLiteral, TemplateToken},

spdlog/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
1717
[lib]
1818
name = "spdlog"
1919

20+
[lints]
21+
workspace = true
22+
2023
[features]
2124
level-off = []
2225
level-critical = []

spdlog/benches/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{
22
env,
3-
fmt::Write,
3+
fmt::Write as _,
44
fs,
55
path::{Path, PathBuf},
66
process::{self, Stdio},

spdlog/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{
22
env,
33
error::Error,
4-
fmt::Write,
4+
fmt::Write as _,
55
fs,
66
path::{Path, PathBuf},
77
};

0 commit comments

Comments
 (0)