crdt: Small simplification in `Redactable`

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
Alexis Sellier 2022-12-01 11:53:46 +01:00
parent 15f183ac7d
commit 60d95ebbd8
No known key found for this signature in database
1 changed files with 1 additions and 4 deletions

View File

@ -47,10 +47,7 @@ impl<T> From<Redactable<T>> for Option<T> {
impl<'a, T> From<&'a Redactable<T>> for Option<&'a T> {
fn from(redactable: &'a Redactable<T>) -> Self {
match redactable {
Redactable::Present(v) => Some(v),
Redactable::Redacted => None,
}
redactable.get()
}
}