Skip to content

Commit

Permalink
Removes Sync dependency for Sequence and downstream traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaiah Becker-Mayer committed Oct 9, 2023
1 parent bf05ef8 commit a110094
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/ironrdp-connector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct Config {

ironrdp_pdu::assert_impl!(Config: Send, Sync);

pub trait State: Send + Sync + core::fmt::Debug + 'static {
pub trait State: Send + core::fmt::Debug + 'static {
fn name(&self) -> &'static str;
fn is_terminal(&self) -> bool;
fn as_any(&self) -> &dyn Any;
Expand Down Expand Up @@ -137,7 +137,7 @@ impl Written {
}
}

pub trait Sequence: Send + Sync {
pub trait Sequence: Send {
fn next_pdu_hint(&self) -> Option<&dyn PduHint>;

fn state(&self) -> &dyn State;
Expand Down
2 changes: 1 addition & 1 deletion crates/ironrdp-rdpdr/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::fmt;
use ironrdp_pdu::PduResult;

/// OS-specific device redirection backend inteface.
pub trait RdpdrBackend: fmt::Debug + Send + Sync {
pub trait RdpdrBackend: fmt::Debug + Send {
fn handle_server_device_announce_response(&mut self, pdu: ServerDeviceAnnounceResponse) -> PduResult<()>;
fn handle_scard_call(&mut self, req: DeviceControlRequest<ScardIoCtlCode>, call: ScardCall) -> PduResult<()>;
}
4 changes: 2 additions & 2 deletions crates/ironrdp-rdpdr/src/pdu/esc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,12 +931,12 @@ pub mod rpce {
///
/// Implementers should typically avoid implementing this trait directly
/// and instead implement [`HeaderlessEncode`], and wrap it in a [`Pdu`].
pub trait Encode: PduEncode + Send + Sync + std::fmt::Debug {}
pub trait Encode: PduEncode + Send + std::fmt::Debug {}

/// Trait for types that can be encoded into an [MS-RPCE] message.
///
/// Implementers should typically implement this trait instead of [`Encode`].
pub trait HeaderlessEncode: Send + Sync + std::fmt::Debug {
pub trait HeaderlessEncode: Send + std::fmt::Debug {
/// Encodes the instance into a buffer sans its [`StreamHeader`] and [`TypeHeader`].
fn encode(&self, dst: &mut WriteCursor<'_>) -> PduResult<()>;
/// Returns the name associated with this RPCE PDU.
Expand Down
2 changes: 1 addition & 1 deletion crates/ironrdp-svc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl StaticVirtualChannel {
/// communication between client and server components over the main data connection.
/// There are at most 31 (optional) static virtual channels that can be created for a single connection, for a
/// total of 32 static channels when accounting for the non-optional I/O channel.
pub trait StaticVirtualChannelProcessor: AsAny + fmt::Debug + Send + Sync {
pub trait StaticVirtualChannelProcessor: AsAny + fmt::Debug + Send {
/// Returns the name of the static virtual channel corresponding to this processor.
fn channel_name(&self) -> ChannelName;

Expand Down

0 comments on commit a110094

Please sign in to comment.