Skip to content

Commit a993d3e

Browse files
committed
Fixed broken code behind feature flags.
1 parent 7eac2ce commit a993d3e

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

runtime/swimos_remote/src/tls/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ impl CryptoProviderConfig {
4343
CryptoProviderConfig::FromFeatureFlags => {
4444
#[cfg(all(feature = "ring_provider", not(feature = "aws_lc_rs_provider")))]
4545
{
46-
return Arc::new(rustls::crypto::ring::default_provider());
46+
return Ok(Arc::new(rustls::crypto::ring::default_provider()));
4747
}
4848

4949
#[cfg(all(feature = "aws_lc_rs_provider", not(feature = "ring_provider")))]
5050
{
51-
return Arc::new(rustls::crypto::aws_lc_rs::default_provider());
51+
return Ok(Arc::new(rustls::crypto::aws_lc_rs::default_provider()));
5252
}
5353

5454
#[allow(unreachable_code)]

swimos_client/src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ use std::time::Duration;
1616
use std::{marker::PhantomData, num::NonZeroUsize, sync::Arc};
1717

1818
use futures_util::future::BoxFuture;
19-
use ratchet::{
20-
deflate::{DeflateConfig, DeflateExtProvider},
21-
WebSocketStream,
22-
};
19+
use ratchet::WebSocketStream;
2320
use rustls::crypto::CryptoProvider;
2421

2522
pub use commander::{CommandError, Commander};
@@ -71,7 +68,7 @@ const DEFAULT_CLOSE_TIMEOUT: Duration = Duration::from_secs(5);
7168
pub struct WebSocketConfig {
7269
pub max_message_size: usize,
7370
#[cfg(feature = "deflate")]
74-
pub deflate_config: Option<DeflateConfig>,
71+
pub deflate_config: Option<ratchet::DeflateConfig>,
7572
}
7673

7774
impl Default for WebSocketConfig {
@@ -137,7 +134,7 @@ impl SwimClientBuilder {
137134

138135
/// Sets the deflate extension configuration for WebSocket connections.
139136
#[cfg(feature = "deflate")]
140-
pub fn set_deflate_config(mut self, to: DeflateConfig) -> SwimClientBuilder {
137+
pub fn set_deflate_config(mut self, to: ratchet::DeflateConfig) -> SwimClientBuilder {
141138
self.client_config.websocket.deflate_config = Some(to);
142139
self
143140
}
@@ -229,8 +226,9 @@ where
229226
max_message_size: websocket.max_message_size,
230227
});
231228

232-
let provider =
233-
DeflateExtProvider::with_config(websocket.deflate_config.unwrap_or_default());
229+
let provider = ratchet::DeflateExtProvider::with_config(
230+
websocket.deflate_config.unwrap_or_default(),
231+
);
234232

235233
start_runtime(
236234
registration_buffer_size,
@@ -258,7 +256,7 @@ where
258256
Transport::new(
259257
networking,
260258
websockets,
261-
NoExtProvider,
259+
ratchet::NoExtProvider,
262260
remote_buffer_size,
263261
close_timeout,
264262
),

0 commit comments

Comments
 (0)