Skip to content

Commit

Permalink
make it work with latest main, and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Dec 17, 2024
1 parent 0323681 commit b0dd695
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions crates/matrix-sdk-crypto/src/dehydrated_devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ impl DehydratedDevices {
device_id: &DeviceId,
device_data: Raw<DehydratedDeviceData>,
) -> Result<RehydratedDevice, DehydrationError> {
let rehydrated = self.inner.rehydrate(&pickle_key, device_id, device_data).await?;
let rehydrated =
self.inner.rehydrate(pickle_key.inner.as_ref(), device_id, device_data).await?;

Ok(RehydratedDevice { rehydrated, original: self.inner.to_owned() })
}
Expand Down Expand Up @@ -367,7 +368,7 @@ impl DehydratedDevice {
trace!("Creating an upload request for a dehydrated device");

let device_id = self.store.static_account().device_id.clone();
let device_data = account.dehydrate(&pickle_key);
let device_data = account.dehydrate(pickle_key.inner.as_ref());
let initial_device_display_name = Some(initial_device_display_name);

transaction.commit().await?;
Expand Down
6 changes: 5 additions & 1 deletion crates/matrix-sdk-crypto/src/olm/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,11 @@ impl Account {

match data {
DehydratedDeviceData::V1(d) => {
let account = InnerAccount::from_dehydrated_device(&d.device_pickle, device_id.as_str(), pickle_key)?;
let account = InnerAccount::from_dehydrated_device(
&d.device_pickle,
device_id.as_str(),
pickle_key,
)?;
Ok(Self::new_helper(account, user_id, device_id))
}
_ => Err(DehydrationError::Json(serde_json::Error::custom(format!(
Expand Down

0 comments on commit b0dd695

Please sign in to comment.