crypto: Don't allow dead code in the SAS layer anymore.

master
Damir Jelić 2020-08-14 11:09:50 +02:00
parent 499f2796ba
commit 5b758b8344
3 changed files with 2 additions and 14 deletions

View File

@ -13,7 +13,6 @@
// limitations under the License.
mod machine;
#[allow(dead_code)]
mod sas;
pub use machine::VerificationMachine;

View File

@ -540,14 +540,6 @@ impl InnerSas {
None
}
}
fn verified_master_keys(&self) -> Option<Arc<Vec<String>>> {
if let InnerSas::Done(s) = self {
Some(s.verified_master_keys())
} else {
None
}
}
}
#[cfg(test)]

View File

@ -228,6 +228,7 @@ pub struct Canceled {
impl<S: Clone> SasState<S> {
/// Get our own user id.
#[cfg(test)]
pub fn user_id(&self) -> &UserId {
&self.ids.account.user_id()
}
@ -237,6 +238,7 @@ impl<S: Clone> SasState<S> {
&self.ids.account.device_id()
}
#[cfg(test)]
pub fn other_device(&self) -> Device {
self.ids.other_device.clone()
}
@ -780,11 +782,6 @@ impl SasState<Done> {
pub fn verified_devices(&self) -> Arc<Vec<Device>> {
self.state.verified_devices.clone()
}
/// Get the list of verified master keys.
pub fn verified_master_keys(&self) -> Arc<Vec<String>> {
self.state.verified_master_keys.clone()
}
}
impl Canceled {