We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b79eb0b commit a881a6dCopy full SHA for a881a6d
2 files changed
.githooks/pre-commit
@@ -9,7 +9,7 @@ if [ $dirty_workspace -eq 0 ]; then
9
fi
10
11
# Enable debug output and exit on error
12
-set -ex
+set -exo pipefail
13
14
cargo test
15
cargo fmt $fmt_args
src/video/uvc/device.rs
@@ -86,9 +86,8 @@ impl Device {
86
// Search for all possible combination of unit and selector
87
for unit in 0..255 {
88
for selector in 0..255 {
89
- match self.find_control(unit, selector) {
90
- Ok(control) => controls.push(control),
91
- Err(_) => {} // Ignore all errors
+ if let Ok(control) = self.find_control(unit, selector) {
+ controls.push(control)
92
}
93
94
0 commit comments