Skip to content

Commit

Permalink
use std prelude in edition 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Feb 18, 2025
1 parent ea84beb commit 94e89b3
Show file tree
Hide file tree
Showing 45 changed files with 5 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::net::SocketAddr;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion g3bench/src/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::Duration;
Expand Down
2 changes: 0 additions & 2 deletions g3keymess/src/control/bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

use anyhow::anyhow;
use openssl::pkey::PKey;

Expand Down
2 changes: 0 additions & 2 deletions g3keymess/src/control/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

use log::debug;

use g3_daemon::control::LocalController;
Expand Down
2 changes: 0 additions & 2 deletions g3proxy/src/control/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

use log::debug;

use g3_daemon::control::LocalController;
Expand Down
2 changes: 0 additions & 2 deletions g3proxy/src/control/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

use tokio::sync::Mutex;

mod bridge;
Expand Down
1 change: 0 additions & 1 deletion g3proxy/src/escape/proxy_float/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::sync::Arc;

use anyhow::anyhow;
Expand Down
1 change: 0 additions & 1 deletion g3proxy/src/escape/route_query/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::VecDeque;
use std::future::Future;
use std::io;
use std::pin::Pin;
use std::sync::Arc;
Expand Down
2 changes: 0 additions & 2 deletions g3tiles/src/control/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

use log::debug;

use g3_daemon::control::LocalController;
Expand Down
1 change: 0 additions & 1 deletion g3tiles/src/module/keyless/backend/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::mem;
use std::sync::Arc;
use std::time::Duration;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-cert-agent/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::VecDeque;
use std::future::Future;
use std::io;
use std::pin::Pin;
use std::sync::Arc;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-daemon/src/control/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::sync::Mutex;

use anyhow::anyhow;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-daemon/src/control/quit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::sync::Mutex;
use std::time::Duration;

Expand Down
2 changes: 0 additions & 2 deletions lib/g3-daemon/src/signal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

use std::future::Future;

#[cfg(unix)]
mod unix;
#[cfg(unix)]
Expand Down
1 change: 0 additions & 1 deletion lib/g3-h2/src/body/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-h2/src/body/from_chunked_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-h2/src/body/to_chunked_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::{self, Write};
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-h2/src/body/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::pin::Pin;
use std::task::{ready, Context, Poll};

Expand Down
1 change: 0 additions & 1 deletion lib/g3-http/src/body/body_to_chunked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::pin::Pin;
use std::task::{ready, Context, Poll};

Expand Down
1 change: 0 additions & 1 deletion lib/g3-http/src/body/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::{self, Write};
use std::pin::Pin;
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-http/src/body/stream_to_chunked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::Write;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-http/src/body/trailer_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::pin::Pin;
use std::str::FromStr;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/cache/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::hash_map;
use std::future::Future;
use std::hash::Hash;
use std::io;
use std::pin::Pin;
Expand Down
2 changes: 1 addition & 1 deletion lib/g3-io-ext/src/io/buf/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::future::{poll_fn, Future};
use std::future::poll_fn;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/fill_wait_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/limited_read_buf_until.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::mem;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/limited_read_until.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::mem;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/limited_skip_until.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::mem;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/read_all_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};

Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/write_all_flush.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::mem;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/ext/write_all_vectored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::{self, IoSlice};
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/io/limited_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/quic/limited_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use std::cell::UnsafeCell;
use std::fmt;
use std::future::Future;
use std::io::{self, IoSliceMut};
use std::pin::Pin;
use std::sync::{Arc, Mutex};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/quic/udp_poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::fmt;
use std::future::Future;
use std::io;
use std::pin::Pin;
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/udp/copy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::IoSliceMut;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-io-ext/src/udp/relay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

use std::future::Future;
use std::io::IoSliceMut;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-ip-locate/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::hash_map;
use std::future::Future;
use std::io;
use std::net::IpAddr;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-ip-locate/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::VecDeque;
use std::future::Future;
use std::io;
use std::net::IpAddr;
use std::pin::Pin;
Expand Down
1 change: 0 additions & 1 deletion lib/g3-openssl/src/async_job/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::cell::UnsafeCell;
use std::future::Future;
use std::io;
use std::os::fd::RawFd;
use std::pin::Pin;
Expand Down
2 changes: 1 addition & 1 deletion lib/g3-openssl/src/ssl/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::future::{poll_fn, Future};
use std::future::poll_fn;
use std::io;
use std::pin::Pin;
use std::task::{Context, Poll};
Expand Down
2 changes: 1 addition & 1 deletion lib/g3-openssl/src/ssl/async_accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::future::{poll_fn, Future};
use std::future::poll_fn;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
2 changes: 1 addition & 1 deletion lib/g3-resolver/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::future::{poll_fn, Future};
use std::future::poll_fn;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-resolver/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::collections::hash_map;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
Expand Down
2 changes: 1 addition & 1 deletion lib/g3-smtp-proto/src/io/text_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

use std::future::{poll_fn, Future};
use std::future::poll_fn;
use std::io;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
Expand Down
1 change: 0 additions & 1 deletion lib/g3-socks/src/v5/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::cell::UnsafeCell;
use std::future::Future;
use std::io::{self, IoSlice, IoSliceMut};
use std::net::{SocketAddr, UdpSocket};
use std::pin::Pin;
Expand Down

0 comments on commit 94e89b3

Please sign in to comment.