Fix warnings in preparation for Rust 1.54.0
This CL fixes several new warnings generated by rustc 1.54.0.
Bug: 194812675
Test: m rust
Change-Id: I3076313ea51c6f4e74029ad9fb45d6f0b6dea460
diff --git a/keystore2/legacykeystore/lib.rs b/keystore2/legacykeystore/lib.rs
index efa0870..e57f159 100644
--- a/keystore2/legacykeystore/lib.rs
+++ b/keystore2/legacykeystore/lib.rs
@@ -526,7 +526,7 @@
use std::time::Duration;
use std::time::Instant;
- static TEST_ALIAS: &str = &"test_alias";
+ static TEST_ALIAS: &str = "test_alias";
static TEST_BLOB1: &[u8] = &[1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
static TEST_BLOB2: &[u8] = &[2, 2, 3, 4, 5, 6, 7, 8, 9, 0];
static TEST_BLOB3: &[u8] = &[3, 2, 3, 4, 5, 6, 7, 8, 9, 0];
@@ -694,9 +694,9 @@
}
let mut db = DB::new(&db_path3).expect("Failed to open database.");
- db.put(3, &TEST_ALIAS, TEST_BLOB3).expect("Failed to add entry (3).");
+ db.put(3, TEST_ALIAS, TEST_BLOB3).expect("Failed to add entry (3).");
- db.remove(3, &TEST_ALIAS).expect("Remove failed (3).");
+ db.remove(3, TEST_ALIAS).expect("Remove failed (3).");
}
});
@@ -710,7 +710,7 @@
let mut db = DB::new(&db_path).expect("Failed to open database.");
// This may return Some or None but it must not fail.
- db.get(3, &TEST_ALIAS).expect("Failed to get entry (4).");
+ db.get(3, TEST_ALIAS).expect("Failed to get entry (4).");
}
});