From 202c20feda2b1b5dab88cb7a58ded42c2c7b330b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 20 Aug 2020 18:01:34 +0200 Subject: [PATCH] crypto: Rename the method to set the local trust of a device. --- matrix_sdk/src/device.rs | 9 ++++++--- matrix_sdk_crypto/src/device.rs | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/matrix_sdk/src/device.rs b/matrix_sdk/src/device.rs index 241c883f..49dfd5ab 100644 --- a/matrix_sdk/src/device.rs +++ b/matrix_sdk/src/device.rs @@ -81,16 +81,19 @@ impl Device { self.inner.trust_state() } - /// Set the trust state of the device to the given state. + /// Set the local trust state of the device to the given state. + /// + /// This won't affect any cross signing trust state, this only sets a flag + /// marking to have the given trust state. /// /// # Arguments /// /// * `trust_state` - The new trust state that should be set for the device. - pub async fn set_trust_state( + pub async fn set_local_trust( &self, trust_state: LocalTrust, ) -> StdResult<(), CryptoStoreError> { - self.inner.set_trust_state(trust_state).await + self.inner.set_local_trust(trust_state).await } } diff --git a/matrix_sdk_crypto/src/device.rs b/matrix_sdk_crypto/src/device.rs index 4ac12dd4..47589595 100644 --- a/matrix_sdk_crypto/src/device.rs +++ b/matrix_sdk_crypto/src/device.rs @@ -125,12 +125,15 @@ impl Device { } } - /// Set the trust state of the device to the given state. + /// Set the local trust state of the device to the given state. + /// + /// This won't affect any cross signing trust state, this only sets a flag + /// marking to have the given trust state. /// /// # Arguments /// /// * `trust_state` - The new trust state that should be set for the device. - pub async fn set_trust_state(&self, trust_state: LocalTrust) -> StoreResult<()> { + pub async fn set_local_trust(&self, trust_state: LocalTrust) -> StoreResult<()> { self.inner.set_trust_state(trust_state); self.verification_machine