Skip to content

Commit

Permalink
separate out protocol extensions into new files; cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz committed Apr 16, 2024
1 parent 359bf71 commit 4fd9e02
Show file tree
Hide file tree
Showing 8 changed files with 485 additions and 490 deletions.
2 changes: 1 addition & 1 deletion certs-grabber/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ async fn main() {
}
code.pop();
code.push_str("];");
println!("{}",code);
println!("{}", code);
}
6 changes: 1 addition & 5 deletions client/src/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ impl tower_service::Service<hyper::Uri> for TlsWispService {
let stream = service.call(uri_parsed).await?.into_inner();
if utils::get_is_secure(&req).map_err(|_| WispError::InvalidUri)? {
let connector = TlsConnector::from(rustls_config);
log!("got stream");
Ok(TokioIo::new(Either::Left(
connector
.connect(
Expand Down Expand Up @@ -216,10 +215,7 @@ impl WebSocketRead for WebSocketReader {
}

impl WebSocketWrapper {
pub fn connect(
url: &str,
protocols: Vec<String>,
) -> Result<(Self, WebSocketReader), JsValue> {
pub fn connect(url: &str, protocols: Vec<String>) -> Result<(Self, WebSocketReader), JsValue> {
let (read_tx, read_rx) = mpsc::unbounded_channel();
let closed = Arc::new(AtomicBool::new(false));

Expand Down
Loading

0 comments on commit 4fd9e02

Please sign in to comment.