Skip to content

Commit 8a8df24

Browse files
committed
Merge remote-tracking branch 'origin/decrypt-trait' into decrypt-trait
2 parents 957b679 + 7bcfcb0 commit 8a8df24

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/crypto/sealed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ impl Sealed {
4343
self.inner()
4444
.attributes
4545
.get(name)
46-
.ok_or(SealError::MissingAttribute(name.to_string()))?
46+
.ok_or_else(|| SealError::MissingAttribute(name.to_string()))?
4747
.as_ciphertext()
48-
.ok_or(SealError::InvalidCiphertext(name.to_string()))
48+
.ok_or_else(|| SealError::InvalidCiphertext(name.to_string()))
4949
})
5050
.collect::<Result<Vec<&str>, SealError>>()?;
5151

src/crypto/unsealed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Unsealed {
5252

5353
pub(super) fn add_protected(&mut self, name: impl Into<String>, plaintext: Plaintext) {
5454
let name = name.into();
55-
let descriptor = format!("{}{}", self.descriptor.as_deref().unwrap_or(""), &name);
55+
let descriptor = format!("{}/{}", self.descriptor.as_deref().unwrap_or(""), &name);
5656
self.protected.insert(name, (plaintext, descriptor));
5757
}
5858

0 commit comments

Comments
 (0)