Skip to content

Commit

Permalink
Update bitflags dependency to v2
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Radomski <[email protected]>
  • Loading branch information
dextero and Marcin Radomski authored Mar 22, 2024
1 parent 754a957 commit 56a8d2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2021"

[dependencies]
libc = "0.2"
bitflags = "1.2"
bitflags = "2"
drm-fourcc = "2.2"

[dependencies.gbm-sys]
Expand All @@ -33,6 +33,14 @@ version = "0.3"
features = ["server_system"]
optional = true

[dependencies.serde]
# Minimal serde version that can compile serde-annotated bitflags v2.
# Workaround that allows -Z minimal-versions build to succeed despite bitflags
# crate not declaring minimum versions of its dependencies precisely enough.
version = "1.0.103"
features = ["derive"]
optional = true

[dev-dependencies.drm]
version = "0.11.0"

Expand All @@ -42,6 +50,7 @@ import-wayland = ["wayland-server", "wayland-backend"]
import-egl = []
drm-support = ["drm"]
use_bindgen = ["gbm-sys/use_bindgen"]
serde = ["dep:serde", "bitflags/serde"]

[workspace]
members = [
Expand Down
2 changes: 2 additions & 0 deletions src/buffer_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ bitflags! {
///
/// Use [`Device::is_format_supported()`] to check if the combination of format
/// and use flags are supported
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(transparent))]
#[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
pub struct BufferObjectFlags: u32 {
/// Buffer is going to be presented to the screen using an API such as KMS
const SCANOUT = ffi::gbm_bo_flags::GBM_BO_USE_SCANOUT as u32;
Expand Down

0 comments on commit 56a8d2e

Please sign in to comment.