mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
clippy: fix result_unit_err
warnings (#31791)
* clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ea62a5e24f
commit
da696b7e57
14 changed files with 175 additions and 191 deletions
|
@ -218,9 +218,8 @@ impl VideoFrameRenderer for MediaFrameRenderer {
|
|||
Some((ref mut image_key, ref mut width, ref mut height)) => {
|
||||
self.old_frame = Some(*image_key);
|
||||
|
||||
let new_image_key = match self.api.generate_image_key() {
|
||||
Ok(key) => key,
|
||||
Err(()) => return,
|
||||
let Some(new_image_key) = self.api.generate_image_key() else {
|
||||
return;
|
||||
};
|
||||
|
||||
/* update current_frame */
|
||||
|
@ -251,9 +250,8 @@ impl VideoFrameRenderer for MediaFrameRenderer {
|
|||
updates.push(ImageUpdate::AddImage(new_image_key, descriptor, image_data));
|
||||
},
|
||||
None => {
|
||||
let image_key = match self.api.generate_image_key() {
|
||||
Ok(key) => key,
|
||||
Err(()) => return,
|
||||
let Some(image_key) = self.api.generate_image_key() else {
|
||||
return;
|
||||
};
|
||||
self.current_frame = Some((image_key, frame.get_width(), frame.get_height()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue