mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-03 07:48:48 +00:00
Fix clippy::redundant_pattern_matching
This commit is contained in:
parent
61270a337b
commit
1a7c4c14cc
2 changed files with 10 additions and 5 deletions
|
@ -190,7 +190,7 @@ clippy:
|
||||||
rules:
|
rules:
|
||||||
- when: 'always'
|
- when: 'always'
|
||||||
script:
|
script:
|
||||||
- cargo clippy --locked --color=always --all --all-features --all-targets -- -A clippy::redundant_pattern_matching -A clippy::single_match -A clippy::cast_lossless -A clippy::manual_range_contains -D warnings
|
- cargo clippy --locked --color=always --all --all-features --all-targets -- -A clippy::single_match -A clippy::cast_lossless -A clippy::manual_range_contains -D warnings
|
||||||
|
|
||||||
deny:
|
deny:
|
||||||
extends: .img-stable
|
extends: .img-stable
|
||||||
|
|
|
@ -213,13 +213,18 @@ impl State {
|
||||||
let res = if let Some(buffer) = buffer {
|
let res = if let Some(buffer) = buffer {
|
||||||
let mut map = match buffer.map_writable() {
|
let mut map = match buffer.map_writable() {
|
||||||
Ok(map) => map,
|
Ok(map) => map,
|
||||||
Err(_) => {
|
Err(e) => {
|
||||||
gst_error!(CAT, obj: pad, "Failed to map provided buffer writable");
|
gst_error!(
|
||||||
|
CAT,
|
||||||
|
obj: pad,
|
||||||
|
"Failed to map provided buffer writable: {}",
|
||||||
|
e
|
||||||
|
);
|
||||||
return Err(gst::FlowError::Error);
|
return Err(gst::FlowError::Error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if let Err(_) = self.adapter.copy(0, &mut map[..available_size]) {
|
if let Err(e) = self.adapter.copy(0, &mut map[..available_size]) {
|
||||||
gst_error!(CAT, obj: pad, "Failed to copy into provided buffer");
|
gst_error!(CAT, obj: pad, "Failed to copy into provided buffer: {}", e);
|
||||||
return Err(gst::FlowError::Error);
|
return Err(gst::FlowError::Error);
|
||||||
}
|
}
|
||||||
if map.len() != available_size {
|
if map.len() != available_size {
|
||||||
|
|
Loading…
Reference in a new issue