diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0893fd..bdfd2f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: - run: sudo apt-get install -y libdrm-dev libwayland-dev - uses: actions-rs/toolchain@v1 with: - toolchain: 1.65.0 + toolchain: 1.66.0 profile: minimal components: clippy default: true @@ -78,12 +78,12 @@ jobs: path: | ~/.cargo/registry ~/.cargo/git - key: ${{ runner.os }}-cargo-rust_1_65-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-cargo-rust_1_66-${{ hashFiles('**/Cargo.toml') }} - name: Build cache uses: actions/cache@v2 with: path: target - key: ${{ runner.os }}-build-rust_1_65-check-${{ hashFiles('**/Cargo.toml') }} + key: ${{ runner.os }}-build-rust_1_66-check-${{ hashFiles('**/Cargo.toml') }} - name: Downgrade to MSRV package versions run: cargo update -p home --precise 0.5.5 - name: Clippy check diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cc3909..ea4b065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.16.0 + +- Update drm-rs to 0.14 +- Fix `use_bindgen` feature + ## 0.15.0 - Update drm-rs to 0.12 diff --git a/Cargo.toml b/Cargo.toml index 80dba2c..97eb738 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "libgbm bindings for rust" license = "MIT" documentation = "https://docs.rs/gbm" repository = "https://github.com/Smithay/gbm.rs" -version = "0.15.0" +version = "0.16.0" keywords = ["wayland", "gbm", "drm", "bindings"] categories = ["external-ffi-bindings"] authors = ["Victoria Brekenfeld "] @@ -21,7 +21,7 @@ version = "0.3.0" path = "./gbm-sys" [dependencies.drm] -version = "0.12.0" +version = "0.14.0" optional = true [dependencies.wayland-server] @@ -42,7 +42,7 @@ features = ["derive"] optional = true [dev-dependencies.drm] -version = "0.12.0" +version = "0.14.0" [features] default = ["import-wayland", "import-egl", "drm-support"] diff --git a/README.md b/README.md index 1d90c0d..54120a8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ provided through the `drm-support` feature. Add to your Cargo.toml ```toml -gbm = "0.15.0" +gbm = "0.16.0" ``` ## Example diff --git a/gbm-sys/build.rs b/gbm-sys/build.rs index b23dd16..4dfc5dc 100644 --- a/gbm-sys/build.rs +++ b/gbm-sys/build.rs @@ -1,10 +1,10 @@ -#[cfg(feature = "gen")] +#[cfg(feature = "use_bindgen")] extern crate bindgen; -#[cfg(not(feature = "gen"))] +#[cfg(not(feature = "use_bindgen"))] fn main() {} -#[cfg(feature = "gen")] +#[cfg(feature = "use_bindgen")] fn main() { use std::{env, path::Path}; diff --git a/gbm-sys/src/lib.rs b/gbm-sys/src/lib.rs index 2c95bcf..77c6bda 100644 --- a/gbm-sys/src/lib.rs +++ b/gbm-sys/src/lib.rs @@ -4,10 +4,10 @@ // it is not so. #![cfg_attr(test, allow(deref_nullptr))] -#[cfg(feature = "gen")] +#[cfg(feature = "use_bindgen")] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); -#[cfg(not(feature = "gen"))] +#[cfg(not(feature = "use_bindgen"))] include!("bindings.rs"); #[link(name = "gbm")] diff --git a/src/buffer_object.rs b/src/buffer_object.rs index b16c8a6..610851f 100644 --- a/src/buffer_object.rs +++ b/src/buffer_object.rs @@ -1,3 +1,5 @@ +#![allow(clippy::unnecessary_cast)] + use crate::{AsRaw, Device, DeviceDestroyedError, Format, Modifier, Ptr, WeakPtr}; #[cfg(feature = "drm-support")] diff --git a/src/device.rs b/src/device.rs index b5aa670..ca39918 100644 --- a/src/device.rs +++ b/src/device.rs @@ -265,7 +265,7 @@ impl Device { let ptr = unsafe { ffi::gbm_bo_import( *self.ffi, - ffi::GBM_BO_IMPORT_WL_BUFFER as u32, + ffi::GBM_BO_IMPORT_WL_BUFFER, buffer.id().as_ptr() as *mut _, usage.bits(), ) @@ -298,7 +298,7 @@ impl Device { ) -> IoResult> { let ptr = ffi::gbm_bo_import( *self.ffi, - ffi::GBM_BO_IMPORT_EGL_IMAGE as u32, + ffi::GBM_BO_IMPORT_EGL_IMAGE, buffer, usage.bits(), ); @@ -337,7 +337,7 @@ impl Device { let ptr = unsafe { ffi::gbm_bo_import( *self.ffi, - ffi::GBM_BO_IMPORT_FD as u32, + ffi::GBM_BO_IMPORT_FD, &mut fd_data as *mut ffi::gbm_import_fd_data as *mut _, usage.bits(), ) @@ -385,7 +385,7 @@ impl Device { let ptr = unsafe { ffi::gbm_bo_import( *self.ffi, - ffi::GBM_BO_IMPORT_FD_MODIFIER as u32, + ffi::GBM_BO_IMPORT_FD_MODIFIER, &mut fd_data as *mut ffi::gbm_import_fd_modifier_data as *mut _, usage.bits(), )