mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
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:
parent
9621cae218
commit
05f4fc0cde
14 changed files with 41 additions and 55 deletions
|
@ -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,
|
||||
))));
|
||||
))))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue