Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
elinorbgr committed Sep 11, 2023
1 parent 9999520 commit dc8042c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ codecov = { repository = "Smithay/calloop" }

[dependencies]
async-task = { version = "4.4.0", optional = true }
bitflags = "1.2"
bitflags = "2.4"
futures-io = { version = "0.3.5", optional = true }
io-lifetimes = "1.0.3"
log = "0.4"
nix = { version = "0.26", default-features = false, features = ["signal"], optional = true }
pin-utils = { version = "0.1.0", optional = true }
Expand Down
3 changes: 1 addition & 2 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
//! [`LoopHandle::adapt_io`]: crate::LoopHandle#method.adapt_io

use std::cell::RefCell;
use std::os::unix::io::{AsRawFd, RawFd};
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, RawFd};
use std::pin::Pin;
use std::rc::Rc;
use std::task::{Context, Poll as TaskPoll, Waker};

use io_lifetimes::{AsFd, BorrowedFd};
use rustix::fs::{fcntl_getfl, fcntl_setfl, OFlags};

#[cfg(feature = "futures-io")]
Expand Down
4 changes: 2 additions & 2 deletions src/loop_logic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::cell::{Cell, RefCell};
use std::fmt::Debug;
use std::os::unix::io::AsFd;
use std::rc::Rc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
Expand All @@ -9,7 +10,6 @@ use std::{io, slice};
#[cfg(feature = "block_on")]
use std::future::Future;

use io_lifetimes::AsFd;
use slab::Slab;

use crate::sources::{Dispatcher, EventSource, Idle, IdleDispatcher};
Expand Down Expand Up @@ -1050,7 +1050,7 @@ mod tests {
use std::os::unix::io::FromRawFd;

let event_loop = EventLoop::<()>::try_new().unwrap();
let fd = unsafe { io_lifetimes::OwnedFd::from_raw_fd(420) };
let fd = unsafe { std::os::unix::io::OwnedFd::from_raw_fd(420) };
let ret = event_loop.handle().insert_source(
crate::sources::generic::Generic::new(fd, Interest::READ, Mode::Level),
|_, _, _| Ok(PostAction::Continue),
Expand Down
9 changes: 7 additions & 2 deletions src/sources/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@
//! these `Generic<_>` as fields of your event source, and delegate the
//! [`EventSource`](crate::EventSource) implementation to them.

use io_lifetimes::{AsFd, BorrowedFd};
use polling::Poller;
use std::{borrow, marker::PhantomData, ops, os::unix::io::AsRawFd, sync::Arc};
use std::{
borrow,
marker::PhantomData,
ops,
os::unix::io::{AsFd, AsRawFd, BorrowedFd},
sync::Arc,
};

use crate::{EventSource, Interest, Mode, Poll, PostAction, Readiness, Token, TokenFactory};

Expand Down
2 changes: 1 addition & 1 deletion src/sources/ping/eventfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
//! can then check the LSB and if it's set, we know it was a close event. This
//! only works if a close event never fires more than once.

use std::os::unix::io::{AsFd, BorrowedFd, OwnedFd};
use std::sync::Arc;

use io_lifetimes::{AsFd, BorrowedFd, OwnedFd};
use rustix::event::{eventfd, EventfdFlags};
use rustix::io::{read, write, Errno};

Expand Down
10 changes: 2 additions & 8 deletions src/sys.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
use std::{cell::RefCell, collections::HashMap, rc::Rc, sync::Arc, time::Duration};

#[cfg(unix)]
use std::os::unix::io::{AsRawFd, BorrowedFd as Borrowed, RawFd as Raw};
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd as Borrowed, RawFd as Raw};

#[cfg(windows)]
use std::os::windows::io::{AsRawSocket, BorrowedSocket as Borrowed, RawSocket as Raw};

#[cfg(unix)]
use io_lifetimes::AsFd;

#[cfg(windows)]
use io_lifetimes::AsSocket;
use std::os::windows::io::{AsRawSocket, AsSocket, BorrowedSocket as Borrowed, RawSocket as Raw};

use polling::{Event, Events, PollMode, Poller};

Expand Down

0 comments on commit dc8042c

Please sign in to comment.