Skip to content

Commit 42d5a07

Browse files
committed
Improving comments.
1 parent e6f2239 commit 42d5a07

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/use_self.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ const SEGMENTS_MSG: &str = "segments should be composed of at least 1 element";
5858
fn span_use_self_lint(cx: &LateContext<'_, '_>, path: &Path) {
5959
// path segments only include actual path, no methods or fields
6060
let last_path_span = path.segments.last().expect(SEGMENTS_MSG).ident.span;
61-
// `to()` doesn't shorten span, so we shorten it with `until(..)`
62-
// and then include it with `to(..)`
61+
// only take path up to the end of last_path_span
6362
let span = path.span.with_hi(last_path_span.hi());
6463

6564
span_lint_and_sugg(

0 commit comments

Comments
 (0)