chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2024-09-06 11:58:39 +02:00
committed by GitHub
parent 93249fc82b
commit e6c1c51b37
361 changed files with 3529 additions and 3586 deletions
+4 -5
View File
@@ -18,9 +18,8 @@ pub fn window_appearance(cx: &WindowContext) -> WindowBackgroundAppearance {
/// Helps determine if you need to take extra steps to prevent
/// transparent backgrounds.
pub fn window_is_transparent(cx: &WindowContext) -> bool {
match window_appearance(cx) {
WindowBackgroundAppearance::Transparent => true,
WindowBackgroundAppearance::Blurred => true,
_ => false,
}
matches!(
window_appearance(cx),
WindowBackgroundAppearance::Transparent | WindowBackgroundAppearance::Blurred
)
}
+3 -3
View File
@@ -9,9 +9,9 @@ pub enum Elevation {
ElementIndex(ElementIndex),
}
impl Into<Elevation> for ElevationIndex {
fn into(self) -> Elevation {
Elevation::ElevationIndex(self)
impl From<ElevationIndex> for Elevation {
fn from(val: ElevationIndex) -> Self {
Elevation::ElevationIndex(val)
}
}