Skip to content

Commit bafeee6

Browse files
epagedjc
authored andcommitted
style: Encourage using existing imports
This came up in #4520 as way to help automate review feedback
1 parent 08fbe3b commit bafeee6

File tree

27 files changed

+126
-149
lines changed

27 files changed

+126
-149
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ trycmd = "0.15.0"
145145
platforms = "3.4"
146146

147147
[lints.rust]
148-
rust_2018_idioms = "deny"
148+
rust_2018_idioms = { level = "deny", priority = -1 }
149+
unused_qualifications = "warn"
149150

150151
[lints.clippy]
151152
# `dbg!()` and `todo!()` clearly shouldn't make it to production:

src/cli/job.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ mod imp {
8585
job.inner,
8686
JobObjectExtendedLimitInformation,
8787
&mut info as *mut _ as *const std::ffi::c_void,
88-
mem::size_of_val(&info) as u32,
88+
size_of_val(&info) as u32,
8989
);
9090
if r == 0 {
9191
return None;
@@ -115,7 +115,7 @@ mod imp {
115115
self.job.inner,
116116
JobObjectExtendedLimitInformation,
117117
&mut info as *mut _ as *const std::ffi::c_void,
118-
mem::size_of_val(&info) as u32,
118+
size_of_val(&info) as u32,
119119
);
120120
if r == 0 {
121121
info!("failed to configure job object to defaults: {}", last_err());

src/cli/log.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ use crate::{process::Process, utils::notify::NotificationLevel};
1919

2020
pub fn tracing_subscriber(
2121
process: &Process,
22-
) -> (
23-
impl tracing::Subscriber + use<>,
24-
reload::Handle<EnvFilter, Registry>,
25-
) {
22+
) -> (impl Subscriber + use<>, reload::Handle<EnvFilter, Registry>) {
2623
#[cfg(feature = "otel")]
2724
let telemetry = telemetry(process);
2825
let (console_logger, console_filter) = console_logger(process);

0 commit comments

Comments
 (0)