From 6fdda45ca371a4905d434d61584a4bc4bc944131 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 6 May 2023 11:38:51 +0100 Subject: [PATCH] update bitflags to v2 --- actix-files/Cargo.toml | 2 +- actix-files/src/named.rs | 1 + actix-http/Cargo.toml | 2 +- actix-http/src/h1/client.rs | 1 + actix-http/src/h1/codec.rs | 1 + actix-http/src/h1/dispatcher.rs | 1 + actix-http/src/message.rs | 1 + actix-http/src/ws/codec.rs | 1 + 8 files changed, 8 insertions(+), 2 deletions(-) diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml index 6909c0ef2..41f3b1135 100644 --- a/actix-files/Cargo.toml +++ b/actix-files/Cargo.toml @@ -26,7 +26,7 @@ actix-service = "2" actix-utils = "3" actix-web = { version = "4", default-features = false } -bitflags = "1" +bitflags = "2" bytes = "1" derive_more = "0.99.5" futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] } diff --git a/actix-files/src/named.rs b/actix-files/src/named.rs index 23d3093dc..c10bc00ed 100644 --- a/actix-files/src/named.rs +++ b/actix-files/src/named.rs @@ -29,6 +29,7 @@ use mime_guess::from_path; use crate::{encoding::equiv_utf8_text, range::HttpRange}; bitflags! { + #[derive(Debug, Clone, Copy)] pub(crate) struct Flags: u8 { const ETAG = 0b0000_0001; const LAST_MD = 0b0000_0010; diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 7c5f07f2d..222a04c8f 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -62,7 +62,7 @@ actix-utils = "3" actix-rt = { version = "2.2", default-features = false } ahash = "0.8" -bitflags = "1.2" +bitflags = "2" bytes = "1" bytestring = "1" derive_more = "0.99.5" diff --git a/actix-http/src/h1/client.rs b/actix-http/src/h1/client.rs index 6a0d531d0..f3947dd12 100644 --- a/actix-http/src/h1/client.rs +++ b/actix-http/src/h1/client.rs @@ -16,6 +16,7 @@ use crate::{ }; bitflags! { + #[derive(Debug, Clone, Copy)] struct Flags: u8 { const HEAD = 0b0000_0001; const KEEP_ALIVE_ENABLED = 0b0000_1000; diff --git a/actix-http/src/h1/codec.rs b/actix-http/src/h1/codec.rs index e11f175c9..e1b629146 100644 --- a/actix-http/src/h1/codec.rs +++ b/actix-http/src/h1/codec.rs @@ -14,6 +14,7 @@ use crate::{ }; bitflags! { + #[derive(Debug, Clone, Copy)] struct Flags: u8 { const HEAD = 0b0000_0001; const KEEP_ALIVE_ENABLED = 0b0000_0010; diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index 60660b85b..c2f8ea453 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -40,6 +40,7 @@ const HW_BUFFER_SIZE: usize = 1024 * 8; const MAX_PIPELINED_MESSAGES: usize = 16; bitflags! { + #[derive(Debug, Clone, Copy)] pub struct Flags: u8 { /// Set when stream is read for first time. const STARTED = 0b0000_0001; diff --git a/actix-http/src/message.rs b/actix-http/src/message.rs index 7469d74ee..47b128fd0 100644 --- a/actix-http/src/message.rs +++ b/actix-http/src/message.rs @@ -16,6 +16,7 @@ pub enum ConnectionType { } bitflags! { + #[derive(Debug, Clone, Copy)] pub(crate) struct Flags: u8 { const CLOSE = 0b0000_0001; const KEEP_ALIVE = 0b0000_0010; diff --git a/actix-http/src/ws/codec.rs b/actix-http/src/ws/codec.rs index 6a149f9a4..681649a7e 100644 --- a/actix-http/src/ws/codec.rs +++ b/actix-http/src/ws/codec.rs @@ -74,6 +74,7 @@ pub struct Codec { } bitflags! { + #[derive(Debug, Clone, Copy)] struct Flags: u8 { const SERVER = 0b0000_0001; const CONTINUATION = 0b0000_0010;