Skip to content

Commit

Permalink
Cargo fmt again
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexclique committed Jan 26, 2024
1 parent cba5e1f commit 4ec18ee
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 22 deletions.
3 changes: 1 addition & 2 deletions src/proactor.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

use std::task::{Context, Poll};
use std::time::Duration;
use std::{future::Future, io};

use crate::config::NucleiConfig;
use once_cell::sync::{OnceCell};
use once_cell::sync::OnceCell;

use super::syscore::*;
use super::waker::*;
Expand Down
2 changes: 0 additions & 2 deletions src/syscore/linux/iouring/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ pub(crate) mod buffer;
pub(crate) mod cancellation;
pub(crate) mod store_file;



pub(crate) use store_file::*;
4 changes: 0 additions & 4 deletions src/syscore/linux/iouring/fs/store_file.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


use std::fs::File;
use std::io;
use std::os::unix::io::{FromRawFd, RawFd};
Expand All @@ -10,8 +8,6 @@ use super::buffer::Buffer;
use crate::syscore::Processor;
use lever::sync::atomics::AtomicBox;



pub struct StoreFile {
fd: RawFd,
buf: Buffer,
Expand Down
2 changes: 1 addition & 1 deletion src/syscore/linux/iouring/iouring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use pin_utils::unsafe_pinned;
use std::future::Future;

use std::io;
use std::os::unix::io::{AsRawFd};
use std::os::unix::io::AsRawFd;
use std::pin::Pin;
use std::sync::atomic::{AtomicU64, Ordering};
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion src/syscore/linux/iouring/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mod processor;
pub(crate) use fs::*;
pub(crate) use iouring::*;


pub(crate) use processor::*;

pub const BACKEND: crate::sys::IoBackend = crate::sys::IoBackend::IoUring;
2 changes: 1 addition & 1 deletion src/syscore/linux/iouring/net/multishot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{Handle, Proactor};
use crossbeam_channel::RecvError;
use futures::Stream;
use pin_project_lite::pin_project;
use rustix::io_uring::{SocketFlags};
use rustix::io_uring::SocketFlags;
use rustix_uring::{opcode as OP, types::Fd};
use std::io;
use std::net::TcpStream;
Expand Down
4 changes: 1 addition & 3 deletions src/syscore/linux/iouring/nethandle.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use std::io;
use std::marker::Unpin;
use std::net::{SocketAddr, ToSocketAddrs};
Expand All @@ -17,8 +16,7 @@ use super::Processor;
use crate::syscore::linux::iouring::fs::store_file::StoreFile;
use crate::syscore::linux::iouring::net::multishot::TcpStreamGenerator;

use crate::{Handle};

use crate::Handle;

impl<T: AsRawFd> Handle<T> {
pub fn new(io: T) -> io::Result<Handle<T>> {
Expand Down
11 changes: 3 additions & 8 deletions src/syscore/linux/iouring/processor.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use std::future::Future;

use std::io;
use std::net::TcpStream;
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6, UdpSocket};
use std::net::{SocketAddr, ToSocketAddrs};
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::os::unix::net::{SocketAddr as UnixSocketAddr, UnixStream};
use std::path::Path;
use std::{
os::unix::io::{AsRawFd, FromRawFd},
};
use std::{io};

use crate::proactor::Proactor;

Expand All @@ -17,12 +15,9 @@ use crate::Handle;
use libc::sockaddr_un;
use os_socketaddr::OsSocketAddr;

use rustix::io_uring::{
msghdr, IoringRecvFlags, RecvFlags, SendFlags, SocketFlags,
};
use rustix::io_uring::{msghdr, IoringRecvFlags, RecvFlags, SendFlags, SocketFlags};
use rustix::net::{SocketAddrAny, SocketAddrUnix};


use rustix_uring::types::{socklen_t, AtFlags, Mode, OFlags, Statx, StatxFlags};
use rustix_uring::{opcode as OP, types::Fd};
use socket2::SockAddr;
Expand Down

0 comments on commit 4ec18ee

Please sign in to comment.