summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-08 22:45:06 -0400
committerGitHub <noreply@github.com>2024-05-08 22:45:06 -0400
commit47f7bed677a6b72e873712de8f3988ea891710e4 (patch)
tree096549459b479cf1383e65c87b77e9f9482df258 /runtime/worker.rs
parente6dc4dfbff25e77d2127591802229b4a74037d24 (diff)
chore: enable clippy::print_stdout and clippy::print_stderr (#23732)
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs
index ee6b256ff..a5fec16e4 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -279,6 +279,7 @@ pub fn create_op_metrics(
max_len.set(max_len.get().max(decl.name.len()));
let max_len = max_len.clone();
Some(Rc::new(
+ #[allow(clippy::print_stderr)]
move |op: &deno_core::_ops::OpCtx, event, source| {
eprintln!(
"[{: >10.3}] {name:max_len$}: {event:?} {source:?}",
@@ -518,7 +519,7 @@ impl MainWorker {
if !has_notified_of_inspector_disconnect
.swap(true, std::sync::atomic::Ordering::SeqCst)
{
- println!("Program finished. Waiting for inspector to disconnect to exit the process...");
+ log::info!("Program finished. Waiting for inspector to disconnect to exit the process...");
}
});