diff --git a/Cargo.lock b/Cargo.lock index 9925fb0d..6d420466 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "g3-io-ext" -version = "0.8.0" +version = "0.9.0" dependencies = [ "ahash", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 204891ae..464e1202 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -214,7 +214,7 @@ g3-histogram = { version = "0.2", path = "lib/g3-histogram" } g3-http = { version = "0.5", path = "lib/g3-http" } g3-icap-client = { version = "0.4", path = "lib/g3-icap-client" } g3-imap-proto = { version = "0.3", path = "lib/g3-imap-proto" } -g3-io-ext = { version = "0.8", path = "lib/g3-io-ext" } +g3-io-ext = { version = "0.9", path = "lib/g3-io-ext" } g3-io-sys = { version = "0.1", path = "lib/g3-io-sys" } g3-ip-locate = { version = "0.2", path = "lib/g3-ip-locate" } g3-journal = { version = "0.3", path = "lib/g3-journal" } diff --git a/lib/g3-io-ext/Cargo.toml b/lib/g3-io-ext/Cargo.toml index 30589e63..36becb5c 100644 --- a/lib/g3-io-ext/Cargo.toml +++ b/lib/g3-io-ext/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "g3-io-ext" -version = "0.8.0" +version = "0.9.0" license.workspace = true edition.workspace = true +rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lib/g3-io-ext/src/limit/datagram.rs b/lib/g3-io-ext/src/limit/datagram.rs index 4f7cc92b..ad0d8923 100644 --- a/lib/g3-io-ext/src/limit/datagram.rs +++ b/lib/g3-io-ext/src/limit/datagram.rs @@ -201,10 +201,10 @@ impl DatagramLimiter { limiter.inner.release_packets(checked - packets); } - if let Some(checked) = limiter.checked_bytes.take() { - if checked > size { - limiter.inner.release_bytes(checked - size); - } + if let Some(checked) = limiter.checked_bytes.take() + && checked > size + { + limiter.inner.release_bytes(checked - size); } } }