Skip to content

Commit 7924f72

Browse files
committed
Update dependencies
1 parent 9999520 commit 7924f72

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rust-analyzer.showUnlinkedFileNotification": false
3+
}

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ codecov = { repository = "Smithay/calloop" }
2020

2121
[dependencies]
2222
async-task = { version = "4.4.0", optional = true }
23-
bitflags = "1.2"
23+
bitflags = "2.4"
2424
futures-io = { version = "0.3.5", optional = true }
25-
io-lifetimes = "1.0.3"
2625
log = "0.4"
2726
nix = { version = "0.26", default-features = false, features = ["signal"], optional = true }
2827
pin-utils = { version = "0.1.0", optional = true }

src/io.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
//! [`LoopHandle::adapt_io`]: crate::LoopHandle#method.adapt_io
88
99
use std::cell::RefCell;
10-
use std::os::unix::io::{AsRawFd, RawFd};
10+
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, RawFd};
1111
use std::pin::Pin;
1212
use std::rc::Rc;
1313
use std::task::{Context, Poll as TaskPoll, Waker};
1414

15-
use io_lifetimes::{AsFd, BorrowedFd};
1615
use rustix::fs::{fcntl_getfl, fcntl_setfl, OFlags};
1716

1817
#[cfg(feature = "futures-io")]

src/loop_logic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::cell::{Cell, RefCell};
22
use std::fmt::Debug;
3+
use std::os::unix::io::AsFd;
34
use std::rc::Rc;
45
use std::sync::atomic::{AtomicBool, Ordering};
56
use std::sync::Arc;
@@ -9,7 +10,6 @@ use std::{io, slice};
910
#[cfg(feature = "block_on")]
1011
use std::future::Future;
1112

12-
use io_lifetimes::AsFd;
1313
use slab::Slab;
1414

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

10521052
let event_loop = EventLoop::<()>::try_new().unwrap();
1053-
let fd = unsafe { io_lifetimes::OwnedFd::from_raw_fd(420) };
1053+
let fd = unsafe { std::os::unix::io::OwnedFd::from_raw_fd(420) };
10541054
let ret = event_loop.handle().insert_source(
10551055
crate::sources::generic::Generic::new(fd, Interest::READ, Mode::Level),
10561056
|_, _, _| Ok(PostAction::Continue),

src/sources/generic.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@
3737
//! these `Generic<_>` as fields of your event source, and delegate the
3838
//! [`EventSource`](crate::EventSource) implementation to them.
3939
40-
use io_lifetimes::{AsFd, BorrowedFd};
4140
use polling::Poller;
42-
use std::{borrow, marker::PhantomData, ops, os::unix::io::AsRawFd, sync::Arc};
41+
use std::{
42+
borrow,
43+
marker::PhantomData,
44+
ops,
45+
os::unix::io::{AsFd, AsRawFd, BorrowedFd},
46+
sync::Arc,
47+
};
4348

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

src/sources/ping/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
//! can then check the LSB and if it's set, we know it was a close event. This
1919
//! only works if a close event never fires more than once.
2020
21+
use std::os::unix::io::{AsFd, BorrowedFd, OwnedFd};
2122
use std::sync::Arc;
2223

23-
use io_lifetimes::{AsFd, BorrowedFd, OwnedFd};
2424
use rustix::event::{eventfd, EventfdFlags};
2525
use rustix::io::{read, write, Errno};
2626

src/sources/ping/pipe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
//! syscall. Sending a ping involves writing to one end of a pipe, and the other
33
//! end becoming readable is what wakes up the event loop.
44
5+
use std::os::unix::io::{AsFd, BorrowedFd, OwnedFd};
56
use std::sync::Arc;
67

7-
use io_lifetimes::{AsFd, BorrowedFd, OwnedFd};
88
use rustix::io::{read, write, Errno};
99

1010
use super::PingError;

src/sys.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
use std::{cell::RefCell, collections::HashMap, rc::Rc, sync::Arc, time::Duration};
22

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

66
#[cfg(windows)]
7-
use std::os::windows::io::{AsRawSocket, BorrowedSocket as Borrowed, RawSocket as Raw};
8-
9-
#[cfg(unix)]
10-
use io_lifetimes::AsFd;
11-
12-
#[cfg(windows)]
13-
use io_lifetimes::AsSocket;
7+
use std::os::windows::io::{AsRawSocket, AsSocket, BorrowedSocket as Borrowed, RawSocket as Raw};
148

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

0 commit comments

Comments
 (0)