Skip to content

Commit 01b7129

Browse files
author
Nicklas Warming Jacobsen
committed
Re-add From implementation for references to base types in to_plaintext macro
1 parent b2bc73c commit 01b7129

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vendor/cipherstash-client/src/encryption/plaintext/to_conversion.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ macro_rules! impl_from {
1010
Plaintext::$variant(Some(value as _))
1111
}
1212
}
13+
14+
impl From<&$ty> for Plaintext {
15+
fn from(value: &$ty) -> Self {
16+
Plaintext::$variant(Some(value.to_owned() as _))
17+
}
18+
}
1319
)*
1420
};
1521
}

0 commit comments

Comments
 (0)