Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32fa1af

Browse files
authored
Merge pull request#73 from inomotech-foss/feature/bump-deps
Update some dependencies
2 parents90ebd73 +25299c1 commit32fa1af

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

‎Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ nb = "1"
4141
log ="0.4"
4242
byte_conv ="0.1.1"
4343
hex ="0.4"
44-
itertools ="0.10"
44+
itertools ="0.13"
4545
libc ="0.2"
46-
nix ="0.26"
47-
bitflags ="1.3"
46+
nix ={version="0.29",features = ["poll","process","net"] }
47+
bitflags ="2.6"
4848
thiserror ="1.0"
4949
socket2 = {version ="0.5",features = ["all"] }
5050
clap = {version ="3.2",optional =true }
51-
anyhow = {version ="1.0",optional =true }
51+
anyhow = {version ="1",optional =true }
5252
neli = {version ="0.6",optional =true }
5353
tokio = {version ="1",features = ["net"],optional =true }
54-
mio = {version ="0.8",features = ["os-ext"],optional =true }
54+
mio = {version ="1",features = ["os-ext"],optional =true }
5555
futures = {version ="0.3",optional =true }
5656
async-io = {version ="1.13",optional =true }
5757
smol = {version ="1.3",optional =true }

‎src/nl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl CanInterface {
453453
/// has specific, non-default, generic parameters.
454454
fnopen_route_socket<T,P>() ->Result<NlSocketHandle,NlError<T,P>>{
455455
// retrieve PID
456-
let pid = unistd::getpid().as_raw()asu32;
456+
let pid = unistd::Pid::this().as_raw()asu32;
457457

458458
// open and bind socket
459459
// groups is set to None(0), because we want no notifications

‎src/socket.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,16 @@ pub trait Socket: AsRawFd {
248248

249249
/// Blocking read a single can frame with timeout.
250250
fnread_frame_timeout(&self,timeout:Duration) ->IoResult<Self::FrameType>{
251-
use nix::poll::{poll,PollFd,PollFlags};
252-
let pollfd =PollFd::new(self.as_raw_fd(),PollFlags::POLLIN);
253-
254-
matchpoll(&mut[pollfd], timeout.as_millis()asc_int)?{
251+
use nix::poll::{poll,PollFd,PollFlags,PollTimeout};
252+
let pollfd =PollFd::new(
253+
unsafe{BorrowedFd::borrow_raw(self.as_raw_fd())},
254+
PollFlags::POLLIN,
255+
);
256+
257+
matchpoll(
258+
&mut[pollfd],
259+
timeout.try_into().unwrap_or(PollTimeout::MAX),
260+
)?{
255261
0 =>Err(IoErrorKind::TimedOut.into()),
256262
_ =>self.read_frame(),
257263
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp