mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
Use Self everywhere (#3787)
This turns on the clippy lint [`clippy::use_self`](https://rust-lang.github.io/rust-clippy/v0.0.212/index.html#use_self) and fixes it everywhere.
This commit is contained in:
@@ -35,8 +35,8 @@ pub use hex_color_runtime::*;
|
||||
// Color conversion:
|
||||
|
||||
impl From<Color32> for Rgba {
|
||||
fn from(srgba: Color32) -> Rgba {
|
||||
Rgba([
|
||||
fn from(srgba: Color32) -> Self {
|
||||
Self([
|
||||
linear_f32_from_gamma_u8(srgba.0[0]),
|
||||
linear_f32_from_gamma_u8(srgba.0[1]),
|
||||
linear_f32_from_gamma_u8(srgba.0[2]),
|
||||
@@ -46,8 +46,8 @@ impl From<Color32> for Rgba {
|
||||
}
|
||||
|
||||
impl From<Rgba> for Color32 {
|
||||
fn from(rgba: Rgba) -> Color32 {
|
||||
Color32([
|
||||
fn from(rgba: Rgba) -> Self {
|
||||
Self([
|
||||
gamma_u8_from_linear_f32(rgba.0[0]),
|
||||
gamma_u8_from_linear_f32(rgba.0[1]),
|
||||
gamma_u8_from_linear_f32(rgba.0[2]),
|
||||
|
||||
Reference in New Issue
Block a user