Skip to content

Commit

Permalink
⏩ wiggle_abi: avoid a double copy
Browse files Browse the repository at this point in the history
Co-Authored-By: Aaron Turon <aturon@fastly.com>
  • Loading branch information
katelyn martin and aturon committed Apr 13, 2022
1 parent f4beefa commit c825585
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/src/wiggle_abi/dictionary_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ impl FastlyDictionary for Session {
.contents()
.get(key)
.ok_or_else(|| DictionaryError::UnknownDictionaryItem(key.to_owned()))?
.as_bytes()
.to_owned();
.as_bytes();

if item_bytes.len() > buf_len as usize {
return Err(Error::BufferLengthError {
Expand Down

0 comments on commit c825585

Please sign in to comment.