diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-02-09 19:25:36 +0300 |
---|---|---|
committer | Kirill Chibisov <contact@kchibisov.com> | 2022-02-10 03:17:21 +0300 |
commit | 02a5a88946edbea92fb6660e4898c4ef2a7d9b6c (patch) | |
tree | 82c175f5c22180ed5241a9fe985e2e9c04a2fa3d | |
parent | d43196297da7fa458b94744ed3a18fe63adeec65 (diff) | |
download | alacritty-02a5a88946edbea92fb6660e4898c4ef2a7d9b6c.tar.gz alacritty-02a5a88946edbea92fb6660e4898c4ef2a7d9b6c.zip |
Fix warnings when building only with Wayland feature
This commit also makes our CI fail hard when warning encountered when
building only for either Wayland or X11.
-rw-r--r-- | .builds/freebsd.yml | 4 | ||||
-rw-r--r-- | .builds/linux.yml | 4 | ||||
-rw-r--r-- | alacritty/src/main.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index ba863a55..e9b25be2 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -33,7 +33,7 @@ tasks: cargo clippy --all-targets - feature-wayland: | cd alacritty/alacritty - cargo test --no-default-features --features=wayland + RUSTFLAGS="-D warnings" cargo test --no-default-features --features=wayland - feature-x11: | cd alacritty/alacritty - cargo test --no-default-features --features=x11 + RUSTFLAGS="-D warnings" cargo test --no-default-features --features=x11 diff --git a/.builds/linux.yml b/.builds/linux.yml index c23375f5..d610d123 100644 --- a/.builds/linux.yml +++ b/.builds/linux.yml @@ -36,7 +36,7 @@ tasks: cargo clippy --all-targets - feature-wayland: | cd alacritty/alacritty - cargo test --no-default-features --features=wayland + RUSTFLAGS="-D warnings" cargo test --no-default-features --features=wayland - feature-x11: | cd alacritty/alacritty - cargo test --no-default-features --features=x11 + RUSTFLAGS="-D warnings" cargo test --no-default-features --features=x11 diff --git a/alacritty/src/main.rs b/alacritty/src/main.rs index 70991871..368151b4 100644 --- a/alacritty/src/main.rs +++ b/alacritty/src/main.rs @@ -20,7 +20,7 @@ use std::string::ToString; use std::{fs, process}; use glutin::event_loop::EventLoop as GlutinEventLoop; -#[cfg(not(any(target_os = "macos", windows)))] +#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))] use glutin::platform::unix::EventLoopWindowTargetExtUnix; use log::info; #[cfg(windows)] |