Skip to content

Commit

Permalink
Remove redundant guard
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Jun 2, 2024
1 parent 4e65db9 commit 5437bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn escape_journal_key(key: &str) -> Vec<u8> {
fn put_field_name(buffer: &mut Vec<u8>, name: FieldName<'_>) {
match name {
FieldName::WellFormed(name) => buffer.extend_from_slice(name.as_bytes()),
FieldName::WriteEscaped(name) if name.is_empty() => buffer.extend_from_slice(b"EMPTY"),
FieldName::WriteEscaped("") => buffer.extend_from_slice(b"EMPTY"),
// FIXME: We should try to find a way to do this with less allocations.
FieldName::WriteEscaped(name) => buffer.extend_from_slice(&escape_journal_key(name)),
}
Expand Down

0 comments on commit 5437bda

Please sign in to comment.