Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
crdt: Small simplification in `Redactable`
Alexis Sellier committed 3 years ago
commit 60d95ebbd8b5440e0a1099733a97d541c6f9c80b
parent 15f183ac7df0d579608aa903cf14afdd20912b4c
1 file changed +1 -4
modified radicle-crdt/src/redactable.rs
@@ -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()
    }
}