Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes Sync dependency for Sequence and downstream traits #209

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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