remove if key.is_none()
@@ -223,7 +223,6 @@ where
.absorb(&mut n_subscribers)?;
for _ in 0..n_subscribers.inner() {
- if key.is_none() {
let mut fork = self.fork();
// Loop through provided number of identifiers and subsequent keys
let mut subscriber_id = Permissioned::<Identifier>::default();
@@ -242,11 +241,9 @@ where
}
keyload.subscribers.push(subscriber_id);
}
- }
self.absorb(&mut n_psks)?;
for _ in 0..n_psks.inner() {
- if key.is_none() {
let mut fork = self.fork();
// Loop thorugh provided psks and keys
@@ -259,12 +256,12 @@ where
.commit()?
.mask(NBytes::new(&mut masked_key))?;
key = Some(masked_key);
+
keyload.psks.push(psk_id);
} else {
fork.drop(KEY_SIZE)?;
}
}
- }
if let Some(key) = key {
self.absorb(External::new(&NBytes::new(&key)))?
