Auto-fixed clippy::needless_return

`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_return

cargo fmt --all
```
This commit is contained in:
Yuri Astrakhan 2025-02-07 01:22:32 -05:00 committed by Olivier Goffart
parent 9621cae218
commit 05f4fc0cde
14 changed files with 41 additions and 55 deletions

View file

@ -306,10 +306,10 @@ fn brush_from_color(rgb_color: Object) -> Result<Value> {
return Err(Error::from_reason("A channel of Color cannot be negative"));
}
return Ok(Value::Brush(Brush::SolidColor(Color::from_argb_u8(
Ok(Value::Brush(Brush::SolidColor(Color::from_argb_u8(
alpha as u8,
red as u8,
green as u8,
blue as u8,
))));
))))
}