We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
default_constructed_unit_structs
check_source_text
1 parent 1c14af8 commit 77f44f2Copy full SHA for 77f44f2
clippy_lints/src/default_constructed_unit_structs.rs
@@ -75,7 +75,7 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs {
75
&& !base.is_suggestable_infer_ty()
76
{
77
let mut removals = vec![(expr.span.with_lo(qpath.qself_span().hi()), String::new())];
78
- if expr.span.with_source_text(cx, |s| s.starts_with('<')) == Some(true) {
+ if expr.span.check_source_text(cx, |s| s.starts_with('<')) {
79
// Remove `<`, '>` has already been removed by the existing removal expression.
80
removals.push((expr.span.with_hi(qpath.qself_span().lo()), String::new()));
81
}
0 commit comments