Skip to content

Commit 6a4cbf5

Browse files
committed
Fix clippy warning
1 parent 753587b commit 6a4cbf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl Pin {
198198
.file_name()
199199
.and_then(|filename| filename.to_str())
200200
.and_then(|filename_str| filename_str.trim_start_matches("gpio").parse::<u64>().ok())
201-
.ok_or(Error::InvalidPath(format!("{:?}", path.as_ref())))
201+
.ok_or_else(|| Error::InvalidPath(format!("{:?}", path.as_ref())))
202202
}
203203

204204
/// Get the pin number

0 commit comments

Comments
 (0)