Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade bitflags to v2.3 #2067

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ __private_docs = ["tower/full", "dep:tower-http"]
[dependencies]
async-trait = "0.1.67"
axum-core = { path = "../axum-core", version = "0.3.4" }
bitflags = "1.0"
bitflags = "2.3"
bytes = "1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2.9"
Expand Down
5 changes: 3 additions & 2 deletions axum/src/response/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use axum_core::{
body::Body,
response::{IntoResponse, Response},
};
use bitflags::bitflags;
use bytes::{BufMut, BytesMut};
use futures_util::{
ready,
Expand Down Expand Up @@ -372,8 +373,8 @@ impl Event {
}
}

bitflags::bitflags! {
#[derive(Default)]
bitflags! {
#[derive(Default, Debug, Clone)]
struct EventFlags: u8 {
const HAS_DATA = 0b0001;
const HAS_EVENT = 0b0010;
Expand Down
3 changes: 2 additions & 1 deletion axum/src/routing/method_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::{

bitflags! {
/// A filter that matches one or more HTTP methods.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct MethodFilter: u16 {
/// Match `DELETE` requests.
const DELETE = 0b000000010;
Expand All @@ -18,7 +19,7 @@ bitflags! {
const OPTIONS = 0b000010000;
/// Match `PATCH` requests.
const PATCH = 0b000100000;
/// Match `POST` requests.
/// Match `POST` requests
const POST = 0b001000000;
/// Match `PUT` requests.
const PUT = 0b010000000;
Expand Down