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:
|
||||
- when: 'always'
|
||||
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:
|
||||
extends: .img-stable
|
||||
|
|
|
@ -213,13 +213,18 @@ impl State {
|
|||
let res = if let Some(buffer) = buffer {
|
||||
let mut map = match buffer.map_writable() {
|
||||
Ok(map) => map,
|
||||
Err(_) => {
|
||||
gst_error!(CAT, obj: pad, "Failed to map provided buffer writable");
|
||||
Err(e) => {
|
||||
gst_error!(
|
||||
CAT,
|
||||
obj: pad,
|
||||
"Failed to map provided buffer writable: {}",
|
||||
e
|
||||
);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
};
|
||||
if let Err(_) = self.adapter.copy(0, &mut map[..available_size]) {
|
||||
gst_error!(CAT, obj: pad, "Failed to copy into provided buffer");
|
||||
if let Err(e) = self.adapter.copy(0, &mut map[..available_size]) {
|
||||
gst_error!(CAT, obj: pad, "Failed to copy into provided buffer: {}", e);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
if map.len() != available_size {
|
||||
|
|
Loading…
Reference in a new issue