Skip to content

Commit

Permalink
fix(connector): make LicenseCache RefUnwindSafe (#653)
Browse files Browse the repository at this point in the history
This fixes commit dd221bf ("feat: support license caching (#634)") and
semver-checks is now happy:

type ProcessorOutput is no longer UnwindSafe, in
/tmp/.tmppi9kAf/IronRDP/crates/ironrdp-session/src/x224/mod.rs:15

Signed-off-by: Marc-André Lureau <[email protected]>
Changelog: ignore
  • Loading branch information
elmarco authored Jan 28, 2025
1 parent ff6c6e8 commit f14f311
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/ironrdp-connector/src/license_exchange.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::{legacy, ConnectorError, ConnectorErrorExt};
use crate::{encode_send_data_request, ConnectorResult, ConnectorResultExt as _, Sequence, State, Written};
use core::fmt::Debug;
use core::panic::RefUnwindSafe;
use core::{fmt, mem};
use ironrdp_core::WriteBuf;
use ironrdp_pdu::rdp::server_license::{self, LicenseInformation, LicensePdu, ServerLicenseError};
Expand Down Expand Up @@ -62,7 +63,8 @@ pub struct LicenseExchangeSequence {
pub license_cache: Arc<dyn LicenseCache>,
}

pub trait LicenseCache: Sync + Send + Debug {
// Use RefUnwindSafe so that types that embed LicenseCache remain UnwindSafe
pub trait LicenseCache: Sync + Send + Debug + RefUnwindSafe {
fn get_license(&self, license_info: LicenseInformation) -> ConnectorResult<Option<Vec<u8>>>;
fn store_license(&self, license_info: LicenseInformation) -> ConnectorResult<()>;
}
Expand Down

0 comments on commit f14f311

Please sign in to comment.