diff --git a/io-uring/src/lib.rs b/io-uring/src/lib.rs index d81313f2..c6c623fa 100644 --- a/io-uring/src/lib.rs +++ b/io-uring/src/lib.rs @@ -63,9 +63,12 @@ macro_rules! map_err { } mod debounce; +pub mod line_logger; +pub mod object_drop_queue; mod ops; mod pending_result; mod sys; +pub mod timer; #[derive(Debug, Error)] pub enum IoUringError { diff --git a/src/utils/line_logger.rs b/io-uring/src/line_logger.rs similarity index 79% rename from src/utils/line_logger.rs rename to io-uring/src/line_logger.rs index 91c75d42..aa5306f5 100644 --- a/src/utils/line_logger.rs +++ b/io-uring/src/line_logger.rs @@ -1,9 +1,6 @@ use { - crate::{ - io_uring::{IoUring, IoUringError}, - utils::{buf::Buf, vecdeque_ext::VecDequeExt}, - }, - isnt::std_1::collections::IsntVecDequeExt, + crate::{IoUring, IoUringError}, + jay_utils::{buf::Buf, vecdeque_ext::VecDequeExt}, std::{collections::VecDeque, rc::Rc}, uapi::OwnedFd, }; @@ -28,7 +25,7 @@ pub async fn log_lines( buf.drain(..=pos); } } - if buf.is_not_empty() { + if !buf.is_empty() { let (left, right) = buf.as_slices(); f(left, right); } diff --git a/src/utils/object_drop_queue.rs b/io-uring/src/object_drop_queue.rs similarity index 93% rename from src/utils/object_drop_queue.rs rename to io-uring/src/object_drop_queue.rs index 56010e85..7417f544 100644 --- a/src/utils/object_drop_queue.rs +++ b/io-uring/src/object_drop_queue.rs @@ -1,8 +1,6 @@ use { - crate::{ - io_uring::{IoUring, PendingPoll, PollCallback}, - utils::{errorfmt::ErrorFmt, oserror::OsError, stack::Stack}, - }, + crate::{IoUring, PendingPoll, PollCallback}, + jay_utils::{errorfmt::ErrorFmt, oserror::OsError, stack::Stack}, std::{ cell::{Cell, RefCell}, rc::Rc, diff --git a/src/utils/timer.rs b/io-uring/src/timer.rs similarity index 92% rename from src/utils/timer.rs rename to io-uring/src/timer.rs index 1bff0c64..7eadc374 100644 --- a/src/utils/timer.rs +++ b/io-uring/src/timer.rs @@ -1,10 +1,8 @@ use { - crate::{ - io_uring::{IoUring, IoUringError}, - utils::{ - buf::TypedBuf, - oserror::{OsError, OsErrorExt2}, - }, + crate::{IoUring, IoUringError}, + jay_utils::{ + buf::TypedBuf, + oserror::{OsError, OsErrorExt2}, }, std::{cell::RefCell, rc::Rc, time::Duration}, thiserror::Error, diff --git a/src/utils.rs b/src/utils.rs index 1446b3fa..80bf482e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -86,14 +86,20 @@ pub mod event_listener { } } pub mod linkedlist; -pub mod line_logger; -pub mod object_drop_queue; +pub mod line_logger { + 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 run_toplevel { pub use jay_async_engine::RunToplevel; } pub mod scroller; -pub mod timer; +pub mod timer { + pub use jay_io_uring::timer::*; +} pub mod clonecell { pub use jay_utils::clonecell::*;