Skip to content

Commit a881a6d

Browse files
committed
style: fix clippy warning
1 parent b79eb0b commit a881a6d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ $dirty_workspace -eq 0 ]; then
99
fi
1010

1111
# Enable debug output and exit on error
12-
set -ex
12+
set -exo pipefail
1313

1414
cargo test
1515
cargo fmt $fmt_args

src/video/uvc/device.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ impl Device {
8686
// Search for all possible combination of unit and selector
8787
for unit in 0..255 {
8888
for selector in 0..255 {
89-
match self.find_control(unit, selector) {
90-
Ok(control) => controls.push(control),
91-
Err(_) => {} // Ignore all errors
89+
if let Ok(control) = self.find_control(unit, selector) {
90+
controls.push(control)
9291
}
9392
}
9493
}

0 commit comments

Comments
 (0)