Skip to content

Commit

Permalink
fix(deps): update rust crate tokio-tungstenite to 0.21 (#804)
Browse files Browse the repository at this point in the history
* fix(deps): update rust crate tokio-tungstenite to 0.21

* http version mismatch

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
  • Loading branch information
renovate[bot] and FabianLars authored Dec 7, 2023
1 parent c7336bc commit 8d00fc0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion plugins/websocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ serde_json.workspace = true
tauri.workspace = true
log.workspace = true
thiserror.workspace = true
http = "1"
rand = "0.8"
futures-util = "0.3"
tokio = { version = "1", features = ["net", "sync"] }
tokio-tungstenite = { version = "0.20", features = ["native-tls"] }
tokio-tungstenite = { version = "0.21", features = ["native-tls"] }
2 changes: 1 addition & 1 deletion plugins/websocket/examples/svelte-app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tauri = { version = "1", features = [] }
tokio = { version = "1", features = ["net"] }
futures-util = "0.3"
tauri-plugin-websocket = { path = "../../../" }
tokio-tungstenite = "0.20"
tokio-tungstenite = "0.21"

[build-dependencies]
tauri-build = { version = "1", features = [] }
Expand Down
4 changes: 2 additions & 2 deletions plugins/websocket/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use futures_util::{stream::SplitSink, SinkExt, StreamExt};
use http::header::{HeaderName, HeaderValue};
use serde::{ser::Serializer, Deserialize, Serialize};
use tauri::{
api::ipc::{format_callback, CallbackFn},
Expand All @@ -9,6 +10,7 @@ use tokio::{net::TcpStream, sync::Mutex};
use tokio_tungstenite::{
connect_async_with_config,
tungstenite::{
client::IntoClientRequest,
protocol::{CloseFrame as ProtocolCloseFrame, WebSocketConfig},
Message,
},
Expand All @@ -17,8 +19,6 @@ use tokio_tungstenite::{

use std::collections::HashMap;
use std::str::FromStr;
use tauri::http::header::{HeaderName, HeaderValue};
use tokio_tungstenite::tungstenite::client::IntoClientRequest;

type Id = u32;
type WebSocket = WebSocketStream<MaybeTlsStream<TcpStream>>;
Expand Down

0 comments on commit 8d00fc0

Please sign in to comment.