mirror of https://github.com/fafhrd91/actix-web
chore: address clippy lints
This commit is contained in:
parent
ec0fe457de
commit
2291da9669
|
@ -31,7 +31,7 @@ fn with_scope_inner(args: TokenStream, input: TokenStream) -> syn::Result<TokenS
|
||||||
|
|
||||||
let scope_prefix_value = scope_prefix.value();
|
let scope_prefix_value = scope_prefix.value();
|
||||||
|
|
||||||
if scope_prefix_value.ends_with("/") {
|
if scope_prefix_value.ends_with('/') {
|
||||||
// trailing slashes cause non-obvious problems
|
// trailing slashes cause non-obvious problems
|
||||||
// it's better to point them out to developers rather than
|
// it's better to point them out to developers rather than
|
||||||
|
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ mod resolver {
|
||||||
|
|
||||||
// resolver struct is cached in thread local so new clients can reuse the existing instance
|
// resolver struct is cached in thread local so new clients can reuse the existing instance
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static TRUST_DNS_RESOLVER: RefCell<Option<Resolver>> = RefCell::new(None);
|
static TRUST_DNS_RESOLVER: RefCell<Option<Resolver>> = const { RefCell::new(None) };
|
||||||
}
|
}
|
||||||
|
|
||||||
// get from thread local or construct a new trust-dns resolver.
|
// get from thread local or construct a new trust-dns resolver.
|
||||||
|
|
2
justfile
2
justfile
|
@ -4,7 +4,7 @@ _list:
|
||||||
# Format workspace.
|
# Format workspace.
|
||||||
fmt:
|
fmt:
|
||||||
cargo +nightly fmt
|
cargo +nightly fmt
|
||||||
npx -y prettier --write $(fd --type=file --hidden --extension=md --extension=yml)
|
fd --hidden --type=file --extension=md --extension=yml --exec-batch npx -y prettier --write
|
||||||
|
|
||||||
# Downgrade dev-dependencies necessary to run MSRV checks/tests.
|
# Downgrade dev-dependencies necessary to run MSRV checks/tests.
|
||||||
[private]
|
[private]
|
||||||
|
|
Loading…
Reference in New Issue