Skip to content

Commit

Permalink
Remove &self from to_numalgo3 signature
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Kovar <[email protected]>
  • Loading branch information
mirgee committed Jul 3, 2023
1 parent 74aa091 commit 0114516
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion did_peer/src/peer_did/numalgos/numalgo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl ResolvableNumalgo for Numalgo2 {
}

impl ToNumalgo3 for Numalgo2 {
fn to_numalgo3(&self, did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError> {
fn to_numalgo3(did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError> {
generate_numalgo3(did)
}
}
2 changes: 1 addition & 1 deletion did_peer/src/peer_did/numalgos/numalgo3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Numalgo for Numalgo3 {
}

impl ToNumalgo3 for Numalgo3 {
fn to_numalgo3(&self, did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError> {
fn to_numalgo3(did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError> {
Ok(PeerDid::from_parts(did.to_owned(), Self::default()))
}
}
2 changes: 1 addition & 1 deletion did_peer/src/peer_did/numalgos/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ pub trait ResolvableNumalgo: Numalgo {
}

pub trait ToNumalgo3: Numalgo {
fn to_numalgo3(&self, did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError>;
fn to_numalgo3(did: &Did) -> Result<PeerDid<Numalgo3>, DidPeerError>;
}
2 changes: 1 addition & 1 deletion did_peer/src/peer_did/peer_did/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<N: Numalgo> PeerDid<N> {

impl<N: ToNumalgo3> PeerDid<N> {
pub fn to_numalgo3(&self) -> Result<PeerDid<Numalgo3>, DidPeerError> {
self.numalgo.to_numalgo3(self.did())
N::to_numalgo3(self.did())
}
}

Expand Down

0 comments on commit 0114516

Please sign in to comment.