diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77328a6ba0..b2be74abe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: push: branches: - - master + - master pull_request: jobs: @@ -11,23 +11,18 @@ jobs: strategy: fail-fast: false matrix: - rust: ['1.71.1', 'stable', 'beta'] + rust: ["1.86", "stable", "beta"] runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 - - - name: Cargo cache - uses: actions/cache@v4 - with: - path: ~/.cargo - key: cargo-${{ matrix.rust }} + uses: actions/checkout@v6 - name: Rust toolchain - uses: hecrj/setup-rust-action@v2 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - rust-version: ${{ matrix.rust }} + toolchain: ${{ matrix.rust }} + rustflags: "" - name: Install system dependencies run: sudo apt-get install libxkbcommon-dev libwayland-dev @@ -42,23 +37,18 @@ jobs: strategy: fail-fast: false matrix: - rust: ['stable', 'beta'] + rust: ["stable", "beta"] runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 - - - name: Cargo cache - uses: actions/cache@v4 - with: - path: ~/.cargo - key: cargo-${{ matrix.rust }} + uses: actions/checkout@v6 - name: Rust toolchain - uses: hecrj/setup-rust-action@v2 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - rust-version: ${{ matrix.rust }} + toolchain: ${{ matrix.rust }} + rustflags: "" - name: Update system repositories run: sudo apt-get update @@ -80,14 +70,13 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Rust toolchain - uses: hecrj/setup-rust-action@v2 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: stable - override: true components: rustfmt, clippy + rustflags: "" - name: Cargo fmt run: cargo fmt --all -- --check diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9a951ffa0c..9c52e8c809 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Deploy Docs to GitHub Pages on: push: branches: - - master + - master jobs: doc: @@ -12,34 +12,24 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 - - - name: Cargo cache - uses: actions/cache@v1 - with: - path: ~/.cargo - key: cargo-stable + uses: actions/checkout@v6 - name: Rust toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: stable - override: true + rustflags: "" - name: Install system dependencies run: sudo apt-get install libxkbcommon-dev libwayland-dev - name: Build Documentation - uses: actions-rs/cargo@v1 - with: - command: doc - args: --no-deps + run: cargo doc --no-deps - name: Setup index run: cp ./doc_index.html ./target/doc/index.html - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./target/doc diff --git a/Cargo.toml b/Cargo.toml index 56430bae48..3cbfe3c144 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ documentation = "https://smithay.github.io/client-toolkit" repository = "https://github.com/smithay/client-toolkit" license = "MIT" edition = "2021" -rust-version = "1.71.1" +rust-version = "1.86" categories = ["gui"] keywords = ["wayland", "client"] description = "Toolkit for making client wayland applications." diff --git a/src/data_device_manager/data_offer.rs b/src/data_device_manager/data_offer.rs index ad69c9257a..5963bff3ff 100644 --- a/src/data_device_manager/data_offer.rs +++ b/src/data_device_manager/data_offer.rs @@ -117,7 +117,7 @@ impl DragOffer { if !self.left || self.dropped { receive(&self.data_offer, mime_type) } else { - Err(std::io::Error::new(std::io::ErrorKind::Other, "offer has left")) + Err(std::io::Error::other("offer has left")) } } diff --git a/src/shm/raw.rs b/src/shm/raw.rs index 8c767a3c14..e183dc56c2 100644 --- a/src/shm/raw.rs +++ b/src/shm/raw.rs @@ -235,12 +235,10 @@ impl RawPool { #[cfg(target_os = "linux")] fn create_memfd() -> rustix::io::Result { - use std::ffi::CStr; - use rustix::fs::{MemfdFlags, SealFlags}; loop { - let name = CStr::from_bytes_with_nul(b"smithay-client-toolkit\0").unwrap(); + let name = c"smithay-client-toolkit"; let flags = MemfdFlags::ALLOW_SEALING | MemfdFlags::CLOEXEC; match rustix::fs::memfd_create(name, flags) {