Skip to content

Commit

Permalink
Explicitly use Cow
Browse files Browse the repository at this point in the history
aumetra committed Apr 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f1ae43c commit 71c1113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vm/src/cache.rs
Original file line number Diff line number Diff line change
@@ -585,6 +585,7 @@ mod tests {
use crate::capabilities::capabilities_from_csv;
use crate::testing::{mock_backend, mock_env, mock_info, MockApi, MockQuerier, MockStorage};
use cosmwasm_std::{coins, Empty};
use std::borrow::Cow;
use std::fs::{create_dir_all, remove_dir_all};
use tempfile::TempDir;
use wasm_encoder::ComponentSection;
@@ -1450,8 +1451,8 @@ mod tests {

let mut wasm_with_version = EMPTY_CONTRACT.to_vec();
let custom_section = wasm_encoder::CustomSection {
name: "cw_state_version".into(),
data: b"21".into(),
name: Cow::Borrowed("cw_state_version"),
data: Cow::Borrowed(b"21"),
};
custom_section.append_to_component(&mut wasm_with_version);

0 comments on commit 71c1113

Please sign in to comment.