Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBloom committed Dec 21, 2023
1 parent e73e454 commit ac0d0b2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
2 changes: 2 additions & 0 deletions squire_core/src/tests/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
use axum::{body::HttpBody, http::Request, response::Response};
use headers::HeaderValue;
use http::{
Expand Down Expand Up @@ -53,3 +54,4 @@ where
.body(serde_json::to_string(&body).unwrap().into())
.unwrap()
}
*/
14 changes: 0 additions & 14 deletions squire_sdk/src/client/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,3 @@ impl From<((), OneshotSender<SessionWatcher>)> for NetworkCommand {
NetworkCommand::GuestLogin(send)
}
}

impl TryFrom<&HeaderMap> for SessionToken {
type Error = TokenParseError;

fn try_from(headers: &HeaderMap) -> Result<Self, Self::Error> {
match headers
.get(Self::HEADER_NAME.as_str())
.and_then(|h| h.to_str().ok())
{
Some(header) => header.parse(),
None => Err(TokenParseError::NoAuthHeader),
}
}
}
3 changes: 1 addition & 2 deletions squire_sdk/src/compat/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ mod client {
use cookie::Cookie;

Check failure on line 107 in squire_sdk/src/compat/native.rs

View workflow job for this annotation

GitHub Actions / Tests (beta, ubuntu-latest)

Diff in /home/runner/work/SquireCore/SquireCore/squire_sdk/src/compat/native.rs

Check failure on line 107 in squire_sdk/src/compat/native.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, ubuntu-latest)

Diff in /home/runner/work/SquireCore/SquireCore/squire_sdk/src/compat/native.rs
use derive_more::From;
use futures::{FutureExt, Sink, Stream, TryFutureExt};
use http::Method;
use reqwest::Url;
use reqwest::{Url, Method};
use serde::{de::DeserializeOwned, Serialize};
use tokio::net::TcpStream;
use tokio_tungstenite::{
Expand Down
4 changes: 2 additions & 2 deletions squire_sdk/src/compat/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ pub fn sleep_until(deadline: Instant) -> Sleep {
)))
}

pub fn log(msg: &str) {
web_sys::console::log_1(&msg.into());
pub fn log(_msg: &str) {
// web_sys::console::log_1(&msg.into());
}

#[cfg(feature = "client")]
Expand Down
2 changes: 1 addition & 1 deletion squire_sdk/tests/server/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
use axum::{body::HttpBody, http::Request, response::Response};
use headers::HeaderValue;
use http::{
Expand All @@ -8,7 +9,6 @@ use hyper::Body;
use serde::{de::DeserializeOwned, Serialize};
use tower::Service;
/*
use super::init::get_app;
pub use crate::utils::*;
Expand Down

0 comments on commit ac0d0b2

Please sign in to comment.