From 60d95ebbd8b5440e0a1099733a97d541c6f9c80b Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Thu, 1 Dec 2022 11:53:46 +0100 Subject: [PATCH] crdt: Small simplification in `Redactable` Signed-off-by: Alexis Sellier --- radicle-crdt/src/redactable.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/radicle-crdt/src/redactable.rs b/radicle-crdt/src/redactable.rs index 326ad331..952babdb 100644 --- a/radicle-crdt/src/redactable.rs +++ b/radicle-crdt/src/redactable.rs @@ -47,10 +47,7 @@ impl From> for Option { impl<'a, T> From<&'a Redactable> for Option<&'a T> { fn from(redactable: &'a Redactable) -> Self { - match redactable { - Redactable::Present(v) => Some(v), - Redactable::Redacted => None, - } + redactable.get() } }