Skip to content

Commit

Permalink
refactor(transport): remove redundanut trait bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd committed May 24, 2024
1 parent 4fc687d commit 10aa084
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jarust_transport/src/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ pub trait TransportProtocol: Debug + Send + Sync + 'static {
/// Send a message over the transport.
async fn send(&mut self, data: &[u8]) -> JaTransportResult<()>;

/// Read-only str for the debug trait
fn name(&self) -> Box<str> {
"TransportProtocol".to_string().into_boxed_str()
}
}

pub struct TransportSession {
inner: Box<dyn TransportProtocol + Send + Sync>,
inner: Box<dyn TransportProtocol>,
}

impl TransportSession {
Expand Down

0 comments on commit 10aa084

Please sign in to comment.