Skip to content

Commit 1b74b1c

Browse files
committed
style: allow clippy::unwrap_or_default
1 parent af7648a commit 1b74b1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
#![cfg_attr(docsrs, feature(doc_cfg))]
9898
#![deny(clippy::cast_ptr_alignment)]
9999
#![deny(unsafe_op_in_unsafe_fn)]
100+
// I found the change suggested by this rules could hurt code readability. I cannot
101+
// remeber every type's default value, in such cases, it forces me to open
102+
// the std doc to insepct the Default value, which is unnecessary with
103+
// `.unwrap_or(value)`.
104+
#![allow(clippy::unwrap_or_default)]
100105

101106
// Re-exported external crates
102107
pub use libc;

0 commit comments

Comments
 (0)