Skip to content

Commit

Permalink
Update to bitflags 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Jul 6, 2023
1 parent 8fbb015 commit d8bf481
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cairo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ path = "../glib"
[dependencies]
ffi = { package = "cairo-sys-rs", path = "sys" }
libc = "0.2"
bitflags = "1.0"
bitflags = "2.3"
thiserror = "1.0.10"
once_cell = "1"
freetype-rs = { version = "0.32", optional = true }
Expand Down
1 change: 1 addition & 0 deletions cairo/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@ gvalue_impl!(
);

bitflags::bitflags! {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct PdfOutline: i32 {
#[doc(alias = "PDF_OUTLINE_FLAG_OPEN")]
const OPEN = ffi::PDF_OUTLINE_FLAG_OPEN;
Expand Down
1 change: 0 additions & 1 deletion gdk-pixbuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
libc = "0.2"
bitflags = "1.3"
ffi = { package = "gdk-pixbuf-sys", path = "sys" }
glib = { path = "../glib" }
gio = { path = "../gio" }
Expand Down
1 change: 0 additions & 1 deletion gio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
libc = "0.2"
bitflags = "1.0"
once_cell = "1.0"
futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3"
Expand Down
3 changes: 2 additions & 1 deletion gio/src/socket_msg_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

use std::fmt;

use glib::{prelude::*, translate::*, value::FromValue, Type};
use glib::{bitflags, prelude::*, translate::*, value::FromValue, Type};

bitflags::bitflags! {
#[doc(alias = "GSocketMsgFlags")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct SocketMsgFlags: ffi::GSocketMsgFlags {
#[doc(alias = "G_SOCKET_MSG_NONE")]
const NONE = ffi::G_SOCKET_MSG_NONE as _;
Expand Down
1 change: 1 addition & 0 deletions glib-macros/src/flags_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ fn gen_bitflags(

quote! {
#crate_ident::bitflags::bitflags! {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#visibility struct #enum_name: u32 {
#(#recurse)*
}
Expand Down
2 changes: 1 addition & 1 deletion glib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name = "glib"
[dependencies]
once_cell = "1.0"
libc = "0.2"
bitflags = "1.0"
bitflags = "2.3"
futures-core = { version = "0.3", default-features = false }
futures-task = { version = "0.3", default-features = false }
futures-executor = "0.3"
Expand Down
1 change: 1 addition & 0 deletions glib/src/gobject/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::translate::*;

bitflags::bitflags! {
#[doc(alias = "GParamFlags")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct ParamFlags: u32 {
#[doc(alias = "G_PARAM_READABLE")]
const READABLE = gobject_ffi::G_PARAM_READABLE as _;
Expand Down
1 change: 1 addition & 0 deletions glib/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ impl LogLevel {

bitflags::bitflags! {
#[doc(alias = "GLogLevelFlags")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct LogLevels: u32 {
#[doc(alias = "G_LOG_LEVEL_ERROR")]
const LEVEL_ERROR = ffi::G_LOG_LEVEL_ERROR;
Expand Down
1 change: 0 additions & 1 deletion pango/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
libc = "0.2"
bitflags = "1.0"
once_cell = "1.0"
ffi = { package = "pango-sys", path = "sys" }
glib = { path = "../glib" }
Expand Down
1 change: 0 additions & 1 deletion pangocairo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
libc = "0.2"
bitflags = "1.0"
ffi = { package = "pangocairo-sys", path = "sys" }
glib = { path = "../glib" }
pango = { path = "../pango" }
Expand Down

0 comments on commit d8bf481

Please sign in to comment.