aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/websocket_loader.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2025-03-03 12:26:53 +0100
committerGitHub <noreply@github.com>2025-03-03 11:26:53 +0000
commit3d320fa96ae2ca95a720c454c47ee7827864c5af (patch)
tree1b7718d574cb9164d924b7571760d90d6d2099c4 /components/net/websocket_loader.rs
parent6300e820b4e3fbfcec260048f931528d4998d5e4 (diff)
downloadservo-3d320fa96ae2ca95a720c454c47ee7827864c5af.tar.gz
servo-3d320fa96ae2ca95a720c454c47ee7827864c5af.zip
Update rustfmt to the 2024 style edition (#35764)
* Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/net/websocket_loader.rs')
-rw-r--r--components/net/websocket_loader.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs
index d601644a125..63f3da1cef3 100644
--- a/components/net/websocket_loader.rs
+++ b/components/net/websocket_loader.rs
@@ -11,11 +11,11 @@
//! over events from the network and events from the DOM, using async/await to avoid
//! the need for a dedicated thread per websocket.
-use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
+use std::sync::atomic::{AtomicBool, Ordering};
-use async_tungstenite::tokio::{client_async_tls_with_connector_and_config, ConnectStream};
use async_tungstenite::WebSocketStream;
+use async_tungstenite::tokio::{ConnectStream, client_async_tls_with_connector_and_config};
use base64::Engine;
use futures::future::TryFutureExt;
use futures::stream::StreamExt;
@@ -28,16 +28,16 @@ use net_traits::{CookieSource, MessageData, WebSocketDomAction, WebSocketNetwork
use servo_url::ServoUrl;
use tokio::net::TcpStream;
use tokio::select;
-use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver};
+use tokio::sync::mpsc::{UnboundedReceiver, unbounded_channel};
use tokio_rustls::TlsConnector;
+use tungstenite::Message;
use tungstenite::error::{Error, ProtocolError, Result as WebSocketResult, UrlError};
use tungstenite::handshake::client::{Request, Response};
use tungstenite::protocol::CloseFrame;
-use tungstenite::Message;
use url::Url;
use crate::async_runtime::HANDLE;
-use crate::connector::{create_tls_config, CACertificates, TlsConfig};
+use crate::connector::{CACertificates, TlsConfig, create_tls_config};
use crate::cookie::ServoCookie;
use crate::fetch::methods::should_request_be_blocked_due_to_a_bad_port;
use crate::hosts::replace_host;
@@ -358,7 +358,7 @@ fn connect(
return Err(
"Received a RequestBuilder with a non-websocket mode in websocket_loader"
.to_string(),
- )
+ );
},
};