Skip to content

Commit 02d77d2

Browse files
committed
impl ord,eq for bitflags
1 parent a2fed13 commit 02d77d2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
- uses: dtolnay/rust-toolchain@stable
19+
- name: Test API
20+
run: cargo test --target ${{ matrix.target }}
1921
- name: Test
2022
run: cargo run --package io-uring-test --features io-uring-test/ci --target ${{ matrix.target }}
2123

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "io-uring"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
authors = ["quininer <[email protected]>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"

src/types.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ bitflags! {
8888
/// The default behavior when the timeout expires is to return a CQE with -libc::ETIME in
8989
/// the res field. To change this behavior to have zero returned, include
9090
/// [`types::TimeoutFlags::ETIME_SUCCESS`].
91-
#[derive(Debug, Clone, Copy)]
91+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
9292
pub struct TimeoutFlags: u32 {
9393
const ABS = sys::IORING_TIMEOUT_ABS;
9494

@@ -104,7 +104,7 @@ bitflags! {
104104

105105
bitflags! {
106106
/// Options for [`Fsync`](super::Fsync).
107-
#[derive(Debug, Clone, Copy)]
107+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
108108
pub struct FsyncFlags: u32 {
109109
const DATASYNC = sys::IORING_FSYNC_DATASYNC;
110110
}
@@ -113,7 +113,7 @@ bitflags! {
113113
bitflags! {
114114
/// Options for [`AsyncCancel`](super::AsyncCancel) and
115115
/// [`Submitter::register_sync_cancel`](super::Submitter::register_sync_cancel).
116-
#[derive(Debug, Clone, Copy)]
116+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
117117
pub(crate) struct AsyncCancelFlags: u32 {
118118
/// Cancel all requests that match the given criteria, rather
119119
/// than just canceling the first one found.

0 commit comments

Comments
 (0)