commit b04e69e2bf86bf0ae039f795a9687ab911347993
parent 1f1f50fb728f23d2e07c07da6739a5770f6378a8
Author: Zack Newman <zack@philomathiclife.com>
Date: Mon, 13 Jul 2026 13:08:01 -0600
update deps. bumps msrv. new lints. move mod private to separate file
Diffstat:
3 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
@@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0"
name = "tokio_dual_stack"
readme = "README.md"
repository = "https://git.philomathiclife.com/repos/tokio_dual_stack/"
-rust-version = "1.93.0"
-version = "0.2.1"
+rust-version = "1.97.0"
+version = "0.2.2"
[lints.rust]
deprecated-safe = { level = "deny", priority = -1 }
@@ -28,12 +28,14 @@ unused = { level = "deny", priority = -1 }
warnings = { level = "deny", priority = -1 }
ambiguous-negative-literals = { level = "deny", priority = -1 }
closure-returning-async-block = { level = "deny", priority = -1 }
+dead-code-pub-in-binary = { level = "deny", priority = -1 }
deprecated-in-future = { level = "deny", priority = -1 }
+#deprecated-llvm-intrinsic = { level = "deny", priority = -1 }
deref-into-dyn-supertrait = { level = "deny", priority = -1 }
ffi-unwind-calls = { level = "deny", priority = -1 }
#fuzzy-provenance-casts = { level = "deny", priority = -1 }
impl-trait-redundant-captures = { level = "deny", priority = -1 }
-linker-messages = { level = "deny", priority = -1 }
+linker-info = { level = "deny", priority = -1 }
#lossy-provenance-casts = { level = "deny", priority = -1 }
macro-use-extern-crate = { level = "deny", priority = -1 }
meta-variable-misuse = { level = "deny", priority = -1 }
@@ -78,6 +80,7 @@ suspicious = { level = "deny", priority = -1 }
arbitrary_source_item_ordering = "allow"
blanket_clippy_restriction_lints = "allow"
implicit_return = "allow"
+inline_trait_bounds = "allow"
pub_use = "allow"
return_and_then = "allow"
@@ -101,7 +104,7 @@ targets = [
[dependencies]
pin-project-lite = { version = "0.2.17", default-features = false }
-tokio = { version = "1.50.0", default-features = false, features = ["net"] }
+tokio = { version = "1.52.3", default-features = false, features = ["net"] }
[dev-dependencies]
-tokio = { version = "1.50.0", default-features = false, features = ["macros", "net", "rt"] }
+tokio = { version = "1.52.3", default-features = false, features = ["macros", "net", "rt"] }
diff --git a/src/lib.rs b/src/lib.rs
@@ -30,6 +30,14 @@
clippy::doc_paragraphs_missing_punctuation,
reason = "false positive for crate documentation having image links"
)]
+#![expect(
+ clippy::std_instead_of_core,
+ reason = "false positive until core::io::ErrorKind is stable"
+)]
+#![cfg_attr(
+ test,
+ expect(dead_code_pub_in_binary, reason = "ignore for unit tests")
+)]
use core::{
net::{SocketAddr, SocketAddrV4, SocketAddrV6},
pin::Pin,
@@ -41,11 +49,7 @@ use std::io::{Error, ErrorKind, Result};
pub use tokio;
use tokio::net::{self, TcpListener, TcpSocket, TcpStream, ToSocketAddrs};
/// Prevents [`Sealed`] from being publicly implementable.
-mod private {
- /// Marker trait to prevent [`super::Tcp`] from being publicly implementable.
- #[expect(unnameable_types, reason = "want Tcp to be 'sealed'")]
- pub trait Sealed {}
-}
+mod private;
use private::Sealed;
/// TCP "listener".
///
@@ -57,9 +61,8 @@ use private::Sealed;
/// # Examples
///
/// ```no_run
-/// # use core::convert::Infallible;
/// # use tokio_dual_stack::Tcp;
-/// async fn main_loop<T: Tcp>(listener: T) -> Infallible {
+/// async fn main_loop<T: Tcp>(listener: T) -> ! {
/// loop {
/// match listener.accept().await {
/// Ok((_, socket)) => println!("Client socket: {socket}"),
diff --git a/src/private.rs b/src/private.rs
@@ -0,0 +1,3 @@
+/// Marker trait to prevent [`super::Tcp`] from being publicly implementable.
+#[expect(unnameable_types, reason = "want Tcp to be 'sealed'")]
+pub trait Sealed {}