Skip to content

Commit 8c85c5b

Browse files
committed
unnecessary_lazy_evaluations
unnecessary closure used with `bool::then`
1 parent 220217a commit 8c85c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/windows/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<'a> PrefixParserSlice<'a, '_> {
7878
fn strip_prefix(&self, prefix: &str) -> Option<Self> {
7979
self.prefix[self.index..]
8080
.starts_with(prefix.as_bytes())
81-
.then(|| Self { index: self.index + prefix.len(), ..*self })
81+
.then_some(Self { index: self.index + prefix.len(), ..*self })
8282
}
8383

8484
fn prefix_bytes(&self) -> &'a [u8] {

0 commit comments

Comments
 (0)