Skip to content

Commit aedcb13

Browse files
committed
Fix an uncoming Clippy lint
This lint isn't an issue on our pinned nightly, but it is on more recent nightlies as of this writing. Might as well fix it now.
1 parent 2a406e8 commit aedcb13

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

zerocopy-derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// our MSRV.
1313
#![allow(unknown_lints)]
1414
#![deny(renamed_and_removed_lints)]
15-
#![deny(clippy::all, clippy::missing_safety_doc)]
15+
#![deny(clippy::all, clippy::missing_safety_doc, clippy::undocumented_unsafe_blocks)]
1616
#![deny(
1717
rustdoc::bare_urls,
1818
rustdoc::broken_intra_doc_links,

zerocopy-derive/src/repr.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ impl<R: KindRepr> Config<R> {
7373
}
7474

7575
let initial_sp = metas[0].span();
76-
let err_span = metas.iter().skip(1).fold(Some(initial_sp), |sp_option, meta| {
77-
sp_option.and_then(|sp| sp.join(meta.span()))
78-
});
76+
let err_span = metas.iter().skip(1).try_fold(initial_sp, |sp, meta| sp.join(meta.span()));
7977

8078
if self.allowed_combinations.contains(&reprs.as_slice()) {
8179
Ok(reprs)

0 commit comments

Comments
 (0)