diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2041fb6..1e42ae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy + - name: Install Linux link libraries + run: sudo apt-get update && sudo apt-get install -y libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev - name: Check format run: cargo fmt --all --check - name: Clippy diff --git a/crates/fluent-layout/src/context_menu.rs b/crates/fluent-layout/src/context_menu.rs index 31c2024..e762ba6 100644 --- a/crates/fluent-layout/src/context_menu.rs +++ b/crates/fluent-layout/src/context_menu.rs @@ -714,7 +714,7 @@ mod tests { use std::time::Duration; use fluent_test_utils::init_fluent_test; - use gpui::{point, px, AppContext as _, TestAppContext}; + use gpui::{point, px, TestAppContext}; use super::*; diff --git a/crates/fluent-layout/src/menu_bar.rs b/crates/fluent-layout/src/menu_bar.rs index 2b281b5..2d0ebef 100644 --- a/crates/fluent-layout/src/menu_bar.rs +++ b/crates/fluent-layout/src/menu_bar.rs @@ -788,7 +788,7 @@ mod tests { use std::time::Duration; use fluent_test_utils::init_fluent_test; - use gpui::{AppContext as _, TestAppContext}; + use gpui::TestAppContext; use super::*; diff --git a/crates/fluent-layout/src/menu_button.rs b/crates/fluent-layout/src/menu_button.rs index 3824d52..f5bce15 100644 --- a/crates/fluent-layout/src/menu_button.rs +++ b/crates/fluent-layout/src/menu_button.rs @@ -699,7 +699,7 @@ mod tests { use std::time::Duration; use fluent_test_utils::init_fluent_test; - use gpui::{AppContext as _, ClickEvent, TestAppContext}; + use gpui::{ClickEvent, TestAppContext}; use super::*; diff --git a/crates/fluent-primitives/src/combobox.rs b/crates/fluent-primitives/src/combobox.rs index 4843885..7ee0b49 100644 --- a/crates/fluent-primitives/src/combobox.rs +++ b/crates/fluent-primitives/src/combobox.rs @@ -504,7 +504,7 @@ mod tests { use std::time::Duration; use fluent_test_utils::init_fluent_test; - use gpui::{AppContext as _, TestAppContext}; + use gpui::TestAppContext; use super::*; diff --git a/crates/fluent-primitives/src/dropdown.rs b/crates/fluent-primitives/src/dropdown.rs index 2b3a8be..2dd026e 100644 --- a/crates/fluent-primitives/src/dropdown.rs +++ b/crates/fluent-primitives/src/dropdown.rs @@ -357,7 +357,7 @@ mod tests { use std::time::Duration; use fluent_test_utils::init_fluent_test; - use gpui::{AppContext as _, TestAppContext}; + use gpui::TestAppContext; use super::*; diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index 16e5a14..3999188 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -40,7 +40,7 @@ fn check_wgsl_shaders() { let shader_source_path = "./src/platform/blade/shaders.wgsl"; let shader_path = PathBuf::from_str(shader_source_path).unwrap(); - println!("cargo:rerun-if-changed={}", &shader_path.display()); + println!("cargo:rerun-if-changed={}", shader_path.display()); let shader_source = std::fs::read_to_string(&shader_path).unwrap(); diff --git a/crates/gpui/examples/hello_world.rs b/crates/gpui/examples/hello_world.rs index 7011093..8ae6745 100644 --- a/crates/gpui/examples/hello_world.rs +++ b/crates/gpui/examples/hello_world.rs @@ -22,7 +22,7 @@ impl Render for HelloWorld { .border_color(rgb(0x0000ff)) .text_xl() .text_color(rgb(0xffffff)) - .child(format!("Hello, {}!", &self.text)) + .child(format!("Hello, {}!", self.text)) .child( div() .flex() diff --git a/crates/gpui/src/geometry.rs b/crates/gpui/src/geometry.rs index fa6f90b..0489d82 100644 --- a/crates/gpui/src/geometry.rs +++ b/crates/gpui/src/geometry.rs @@ -3570,7 +3570,7 @@ pub const fn relative(fraction: f32) -> DefiniteLength { /// Returns the Golden Ratio, i.e. `~(1.0 + sqrt(5.0)) / 2.0`. pub fn phi() -> DefiniteLength { - relative(1.618_034) + relative(std::f32::consts::GOLDEN_RATIO) } /// Constructs a `Rems` value representing a length in rems. diff --git a/crates/gpui/src/taffy.rs b/crates/gpui/src/taffy.rs index 29b4ce6..edd7848 100644 --- a/crates/gpui/src/taffy.rs +++ b/crates/gpui/src/taffy.rs @@ -309,7 +309,7 @@ impl ToTaffy for Style { unit: &Option, ) -> Vec> { // grid-template-columns: repeat(, minmax(0, 1fr)); - unit.map(|count| vec![repeat(count, vec![minmax(length(0.0), fr(1.0))])]) + unit.map(|count| vec![repeat(count, vec![minmax(length(0.0_f32), fr(1.0_f32))])]) .unwrap_or_default() }