summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/errors.rs15
-rw-r--r--cli/lsp/tsc.rs2
-rw-r--r--cli/npm/managed/resolvers/local.rs2
-rw-r--r--cli/tools/test/mod.rs2
-rw-r--r--cli/util/file_watcher.rs8
5 files changed, 9 insertions, 20 deletions
diff --git a/cli/errors.rs b/cli/errors.rs
index 9fe433f18..a8fde6e76 100644
--- a/cli/errors.rs
+++ b/cli/errors.rs
@@ -17,7 +17,6 @@ use deno_graph::ModuleGraphError;
use deno_graph::ModuleLoadError;
use deno_graph::ResolutionError;
use import_map::ImportMapError;
-use std::fmt::Write;
fn get_import_map_error_class(_: &ImportMapError) -> &'static str {
"URIError"
@@ -112,17 +111,5 @@ pub fn get_error_class_name(e: &AnyError) -> &'static str {
e.downcast_ref::<ResolutionError>()
.map(get_resolution_error_class)
})
- .unwrap_or_else(|| {
- if cfg!(debug) {
- log::warn!(
- "Error '{}' contains boxed error of unknown type:{}",
- e,
- e.chain().fold(String::new(), |mut output, e| {
- let _ = write!(output, "\n {e:?}");
- output
- })
- );
- }
- "Error"
- })
+ .unwrap_or("Error")
}
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index 4592edad4..7dfb68f53 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -215,6 +215,8 @@ pub enum SemicolonPreference {
Remove,
}
+// Allow due to false positive https://github.com/rust-lang/rust-clippy/issues/13170
+#[allow(clippy::needless_borrows_for_generic_args)]
fn normalize_diagnostic(
diagnostic: &mut crate::tsc::Diagnostic,
specifier_map: &TscSpecifierMap,
diff --git a/cli/npm/managed/resolvers/local.rs b/cli/npm/managed/resolvers/local.rs
index b741fd15d..7687e23f8 100644
--- a/cli/npm/managed/resolvers/local.rs
+++ b/cli/npm/managed/resolvers/local.rs
@@ -1048,7 +1048,7 @@ fn junction_or_symlink_dir(
match junction::create(old_path, new_path) {
Ok(()) => Ok(()),
Err(junction_err) => {
- if cfg!(debug) {
+ if cfg!(debug_assertions) {
// When running the tests, junctions should be created, but if not then
// surface this error.
log::warn!("Error creating junction. {:#}", junction_err);
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 904b9ecb7..4fbd0423e 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -1653,7 +1653,7 @@ fn is_supported_test_ext(path: &Path) -> bool {
/// input order.
///
/// - Specifiers matching the `is_supported_test_ext` predicate are marked as
-/// `TestMode::Documentation`.
+/// `TestMode::Documentation`.
/// - Specifiers matching the `is_supported_test_path` are marked as `TestMode::Executable`.
/// - Specifiers matching both predicates are marked as `TestMode::Both`
fn collect_specifiers_with_test_mode(
diff --git a/cli/util/file_watcher.rs b/cli/util/file_watcher.rs
index 51dde8404..d92d880bc 100644
--- a/cli/util/file_watcher.rs
+++ b/cli/util/file_watcher.rs
@@ -195,8 +195,8 @@ impl WatcherCommunicator {
/// Creates a file watcher.
///
/// - `operation` is the actual operation we want to run every time the watcher detects file
-/// changes. For example, in the case where we would like to bundle, then `operation` would
-/// have the logic for it like bundling the code.
+/// changes. For example, in the case where we would like to bundle, then `operation` would
+/// have the logic for it like bundling the code.
pub async fn watch_func<O, F>(
flags: Arc<Flags>,
print_config: PrintConfig,
@@ -234,8 +234,8 @@ pub enum WatcherRestartMode {
/// Creates a file watcher.
///
/// - `operation` is the actual operation we want to run every time the watcher detects file
-/// changes. For example, in the case where we would like to bundle, then `operation` would
-/// have the logic for it like bundling the code.
+/// changes. For example, in the case where we would like to bundle, then `operation` would
+/// have the logic for it like bundling the code.
pub async fn watch_recv<O, F>(
mut flags: Arc<Flags>,
print_config: PrintConfig,