quinn: fix clippy warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1867>
This commit is contained in:
Andoni Morales Alastruey 2024-12-05 13:42:30 +01:00 committed by GStreamer Marge Bot
parent b020ae6fc2
commit 1ba2468a05
3 changed files with 11 additions and 16 deletions

View file

@ -319,10 +319,7 @@ impl BaseSrcImpl for QuinnWebTransportClientSrc {
if let State::Started(ref mut state) = *state {
let session = &state.session;
session.close(
CONNECTION_CLOSE_CODE.into(),
CONNECTION_CLOSE_MSG.as_bytes(),
);
session.close(CONNECTION_CLOSE_CODE, CONNECTION_CLOSE_MSG.as_bytes());
}
*state = State::Stopped;

View file

@ -61,10 +61,12 @@ struct Settings {
impl Default for Settings {
fn default() -> Self {
let mut transport_config = QuinnQuicTransportConfig::default();
// Required for the WebTransport handshake
transport_config.max_concurrent_bidi_streams = 2u32.into();
transport_config.max_concurrent_uni_streams = 1u32.into();
let transport_config = QuinnQuicTransportConfig {
// Required for the WebTransport handshake
max_concurrent_bidi_streams: 2u32.into(),
max_concurrent_uni_streams: 1u32.into(),
..Default::default()
};
Settings {
address: DEFAULT_ADDR.to_string(),
@ -447,7 +449,7 @@ impl BaseSinkImpl for QuinnWebTransportServerSink {
};
}
session.close(CONNECTION_CLOSE_CODE.into(), close_msg.as_bytes());
session.close(CONNECTION_CLOSE_CODE, close_msg.as_bytes());
}
*state = State::Stopped;

View file

@ -230,14 +230,10 @@ fn create_transport_config(
));
transport_config
.datagram_send_buffer_size(ep_config.transport_config.datagram_send_buffer_size);
transport_config.max_concurrent_bidi_streams(
ep_config
.transport_config
.max_concurrent_bidi_streams
.into(),
);
transport_config
.max_concurrent_uni_streams(ep_config.transport_config.max_concurrent_uni_streams.into());
.max_concurrent_bidi_streams(ep_config.transport_config.max_concurrent_bidi_streams);
transport_config
.max_concurrent_uni_streams(ep_config.transport_config.max_concurrent_uni_streams);
transport_config.mtu_discovery_config(Some(mtu_config));
transport_config