Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/ember-core/src/keyspace/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ impl Keyspace {
return Ok(vec![]);
};
match &entry.value {
Value::Hash(hash) => Ok(hash.iter().map(|(_, v)| Bytes::copy_from_slice(v)).collect()),
Value::Hash(hash) => Ok(hash
.iter()
.map(|(_, v)| Bytes::copy_from_slice(v))
.collect()),
_ => Err(WrongType),
}
}
Expand Down
8 changes: 7 additions & 1 deletion crates/ember-core/src/types/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,13 @@ impl<'a> ExactSizeIterator for PackedIter<'a> {}
/// Rebuilds the packed buffer with a single field updated in-place.
/// `field_start` is where the old field entry begins, `field_end` is
/// where the next field starts (or buf.len() if it was the last field).
fn rebuild_with_update(buf: &mut Vec<u8>, field_start: usize, field_end: usize, name: &str, new_val: &Bytes) {
fn rebuild_with_update(
buf: &mut Vec<u8>,
field_start: usize,
field_end: usize,
name: &str,
new_val: &Bytes,
) {
let name_bytes = name.as_bytes();
let name_len = name_bytes.len() as u16;
let val_len = new_val.len() as u32;
Expand Down