Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Blocs committed Feb 29, 2020
1 parent 70de065 commit 4053532
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/kvstore_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const CIPHER: std::option::Option<[&str; 2]> = Some([

const DATA: [u8; 512] = [42u8; 512];

const KEY: String = String::from("test_value");
const KEY: &str = "test_value";

fn init_kv() -> KvStore {
let kv = KvStore::new(CIPHER);
kv.set(KEY.clone(), DATA.to_vec());
kv.set(KEY.to_string(), DATA.to_vec());
kv
}

Expand All @@ -22,7 +22,7 @@ mod tests {
#[test]
fn get_returns_a_value() {
let kv = init_kv();
let value = kv.get(KEY.clone());
let value = kv.get(KEY.to_string());

match value {
Some(v) => assert_eq!(v.data, DATA.to_vec()),
Expand Down

0 comments on commit 4053532

Please sign in to comment.