Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use more workspace-wide configurations #4061

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ pub async fn main(
}

let Some(subcmd) = matches.subcmd else {
eprintln!("{}", Rustup::command().render_long_help());
let help = Rustup::command().render_long_help();
writeln!(process.stderr().lock(), "{help}")?;
return Ok(utils::ExitCode(1));
};

Expand Down
1 change: 1 addition & 0 deletions src/diskio/threaded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ impl<'a> Executor for Threaded<'a> {
prev_files as u64,
));
}
#[allow(clippy::print_stderr)]
rami3l marked this conversation as resolved.
Show resolved Hide resolved
if prev_files > 50 {
eprintln!("{prev_files} deferred IO operations");
}
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
clippy::result_large_err, // 288 bytes is our 'large' variant today, which is unlikely to be a performance problem
clippy::arc_with_non_send_sync, // will get resolved as we move further into async
)]
#![cfg_attr(not(test), warn(
// We use the logging system instead of printing directly.
clippy::print_stdout,
clippy::print_stderr,
))]
#![recursion_limit = "1024"]

use anyhow::{anyhow, Result};
Expand Down
2 changes: 1 addition & 1 deletion src/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::box_default)]
#![allow(clippy::box_default, clippy::print_stdout, clippy::print_stderr)]
//! Test support module; public to permit use from integration tests.

pub mod mock;
Expand Down