Skip to content

Commit

Permalink
Factor out stream-guard into separate library
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed May 31, 2024
1 parent aa4fd17 commit 7f0bf51
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 54 deletions.
2 changes: 1 addition & 1 deletion lighthouse-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ serde_with = "3.4"
rmp-serde = "1.0"
rand = "0.8"
thiserror = "1.0.58"
pin-project = "1.1.5"
stream-guard = "1.0.0"

[dev-dependencies]
tracing-subscriber = { version = "0.3", features = ["env-filter", "std"] }
Expand Down
2 changes: 0 additions & 2 deletions lighthouse-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ mod connect;
mod constants;
mod error;
mod lighthouse;
mod utils;
mod spawn;

pub use check::*;
pub use connect::*;
pub use constants::*;
pub use error::*;
pub use lighthouse::*;
pub(crate) use utils::*;
pub use spawn::*;

pub use lighthouse_protocol as protocol;
3 changes: 2 additions & 1 deletion lighthouse-client/src/lighthouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use async_tungstenite::tungstenite::{Message, self};
use futures::{prelude::*, channel::mpsc::{Sender, self}, stream::{SplitSink, SplitStream}, lock::Mutex};
use lighthouse_protocol::{Authentication, ClientMessage, DirectoryTree, Frame, LaserMetrics, Model, ServerMessage, Value, Verb};
use serde::{Deserialize, Serialize};
use stream_guard::GuardStreamExt;
use tracing::{warn, error, debug, info};
use crate::{Check, Error, Result, Spawner, StreamExt};
use crate::{Check, Error, Result, Spawner};

/// A connection to the lighthouse server for sending requests and receiving events.
pub struct Lighthouse<S> {
Expand Down
3 changes: 0 additions & 3 deletions lighthouse-client/src/utils/mod.rs

This file was deleted.

47 changes: 0 additions & 47 deletions lighthouse-client/src/utils/stream_guard.rs

This file was deleted.

0 comments on commit 7f0bf51

Please sign in to comment.