Skip to content

Commit

Permalink
Fixed warnings for deprecated dyn syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
izolyomi committed Jul 5, 2021
1 parent 5738d02 commit 7030c44
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion morpheus-sdk/src/vault/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ impl Plugin {
}

pub(super) fn to_state(&self) -> Box<dyn State<PublicState>> {
State::map(&self.inner, |s| &s.public_state, |s| &mut s.public_state)
<dyn State<_>>::map(&self.inner, |s| &s.public_state, |s| &mut s.public_state)
}
}
2 changes: 1 addition & 1 deletion morpheus-sdk/src/vault/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl PluginPrivate<Plugin> for Private {

impl Private {
pub fn personas(&self) -> Result<PrivateKind> {
let state = State::map(self.state.as_ref(), |s| &s.personas, |s| &mut s.personas);
let state = <dyn State<_>>::map(self.state.as_ref(), |s| &s.personas, |s| &mut s.personas);
let kind = self.root.personas()?;
let vault_dirty = self.vault_dirty.clone();
Ok(PrivateKind::new(state, kind, vault_dirty))
Expand Down
2 changes: 1 addition & 1 deletion morpheus-sdk/src/vault/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Public {
}

pub fn personas(&self) -> Result<PublicKind> {
let state = State::map(self.state.as_ref(), |s| &s.personas, |s| &mut s.personas);
let state = <dyn State<_>>::map(self.state.as_ref(), |s| &s.personas, |s| &mut s.personas);
Ok(PublicKind::new(state, DidKind::Persona))
}

Expand Down
2 changes: 1 addition & 1 deletion vault/src/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Vault {
}

pub fn to_modifiable(&self) -> Box<dyn State<bool>> {
State::map(&self.inner, |v| &v.is_dirty, |v| &mut v.is_dirty)
<dyn State<_>>::map(&self.inner, |v| &v.is_dirty, |v| &mut v.is_dirty)
}

fn encrypt_seed(seed: &Seed, unlock_password: &str) -> Result<String> {
Expand Down

0 comments on commit 7030c44

Please sign in to comment.