Skip to content

Commit

Permalink
no unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyijun committed Jan 31, 2025
1 parent de250fc commit a3f5529
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/use_crate_prefix_for_self_imports.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet_opt;
use def_id::LOCAL_CRATE;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::Applicability;
Expand Down Expand Up @@ -157,7 +156,7 @@ impl<'tcx> UseCratePrefixForSelfImports<'_, 'tcx> {
segment.ident.span,
"this import is not clear",
"prefix with `crate::`",
format!("crate::{}", snippet_opt(cx, segment.ident.span).unwrap()),
format!("crate::{root}"),
Applicability::MachineApplicable,
);
}
Expand Down

0 comments on commit a3f5529

Please sign in to comment.