1
0
Fork 0
forked from wry/wry

io_uring: move fd utility helpers into crate

This commit is contained in:
kossLAN 2026-05-29 12:11:41 -04:00
parent 9606e0892c
commit e996d9528a
No known key found for this signature in database
5 changed files with 21 additions and 19 deletions

View file

@ -63,9 +63,12 @@ macro_rules! map_err {
} }
mod debounce; mod debounce;
pub mod line_logger;
pub mod object_drop_queue;
mod ops; mod ops;
mod pending_result; mod pending_result;
mod sys; mod sys;
pub mod timer;
#[derive(Debug, Error)] #[derive(Debug, Error)]
pub enum IoUringError { pub enum IoUringError {

View file

@ -1,9 +1,6 @@
use { use {
crate::{ crate::{IoUring, IoUringError},
io_uring::{IoUring, IoUringError}, jay_utils::{buf::Buf, vecdeque_ext::VecDequeExt},
utils::{buf::Buf, vecdeque_ext::VecDequeExt},
},
isnt::std_1::collections::IsntVecDequeExt,
std::{collections::VecDeque, rc::Rc}, std::{collections::VecDeque, rc::Rc},
uapi::OwnedFd, uapi::OwnedFd,
}; };
@ -28,7 +25,7 @@ pub async fn log_lines(
buf.drain(..=pos); buf.drain(..=pos);
} }
} }
if buf.is_not_empty() { if !buf.is_empty() {
let (left, right) = buf.as_slices(); let (left, right) = buf.as_slices();
f(left, right); f(left, right);
} }

View file

@ -1,8 +1,6 @@
use { use {
crate::{ crate::{IoUring, PendingPoll, PollCallback},
io_uring::{IoUring, PendingPoll, PollCallback}, jay_utils::{errorfmt::ErrorFmt, oserror::OsError, stack::Stack},
utils::{errorfmt::ErrorFmt, oserror::OsError, stack::Stack},
},
std::{ std::{
cell::{Cell, RefCell}, cell::{Cell, RefCell},
rc::Rc, rc::Rc,

View file

@ -1,10 +1,8 @@
use { use {
crate::{ crate::{IoUring, IoUringError},
io_uring::{IoUring, IoUringError}, jay_utils::{
utils::{ buf::TypedBuf,
buf::TypedBuf, oserror::{OsError, OsErrorExt2},
oserror::{OsError, OsErrorExt2},
},
}, },
std::{cell::RefCell, rc::Rc, time::Duration}, std::{cell::RefCell, rc::Rc, time::Duration},
thiserror::Error, thiserror::Error,

View file

@ -86,14 +86,20 @@ pub mod event_listener {
} }
} }
pub mod linkedlist; pub mod linkedlist;
pub mod line_logger; pub mod line_logger {
pub mod object_drop_queue; pub use jay_io_uring::line_logger::*;
}
pub mod object_drop_queue {
pub use jay_io_uring::object_drop_queue::*;
}
pub mod pending_serial; pub mod pending_serial;
pub mod run_toplevel { pub mod run_toplevel {
pub use jay_async_engine::RunToplevel; pub use jay_async_engine::RunToplevel;
} }
pub mod scroller; pub mod scroller;
pub mod timer; pub mod timer {
pub use jay_io_uring::timer::*;
}
pub mod clonecell { pub mod clonecell {
pub use jay_utils::clonecell::*; pub use jay_utils::clonecell::*;