Skip to content

Commit

Permalink
refactor(s2n-quic-h3): remove s2n-quic-core dependency (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyRosenblum committed Sep 19, 2024
1 parent 132ba54 commit 29bd9b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion quic/s2n-quic-h3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ bytes = { version = "1", default-features = false }
futures = { version = "0.3", default-features = false }
h3 = "0.0.6"
s2n-quic = { path = "../s2n-quic" }
s2n-quic-core = { path = "../s2n-quic-core" }
tracing = { version = "0.1", optional = true }

[features]
Expand Down
10 changes: 6 additions & 4 deletions quic/s2n-quic-h3/src/s2n_quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
use bytes::{Buf, Bytes};
use core::task::ready;
use h3::quic::{self, Error, StreamId, WriteBuf};
use s2n_quic::stream::{BidirectionalStream, ReceiveStream};
use s2n_quic_core::varint::VarInt;
use s2n_quic::{
application,
stream::{BidirectionalStream, ReceiveStream},
};
use std::{
convert::TryInto,
fmt::{self, Display},
Expand Down Expand Up @@ -178,7 +180,7 @@ where
self.conn.close(
code.value()
.try_into()
.unwrap_or_else(|_| VarInt::MAX.into()),
.unwrap_or(application::Error::UNKNOWN),
);
}
}
Expand Down Expand Up @@ -461,7 +463,7 @@ where
fn reset(&mut self, reset_code: u64) {
let _ = self
.stream
.reset(reset_code.try_into().unwrap_or_else(|_| VarInt::MAX.into()));
.reset(reset_code.try_into().unwrap_or(application::Error::UNKNOWN));
}

#[cfg_attr(feature = "tracing", instrument(skip_all, level = "trace"))]
Expand Down

0 comments on commit 29bd9b7

Please sign in to comment.