mirror of
https://github.com/google/alioth.git
synced 2024-10-23 06:57:24 +00:00
tests: use crate assert_matches
for stable rust
The assert_matches in std still requres nightly rust. Signed-off-by: Changyuan Lyu <changyuanl@google.com>
This commit is contained in:
parent
22b4c65b3e
commit
0fa9d8ca61
7 changed files with 14 additions and 5 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -15,6 +15,7 @@ dependencies = [
|
|||
name = "alioth"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"assert_matches",
|
||||
"bitfield",
|
||||
"bitflags",
|
||||
"libc",
|
||||
|
@ -105,6 +106,12 @@ version = "1.0.82"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
|
||||
|
||||
[[package]]
|
||||
name = "assert_matches"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.2.0"
|
||||
|
|
|
@ -12,3 +12,6 @@ log = "0.4"
|
|||
mio = { version = "0.8.8", features = ["os-poll", "os-ext", "net"] }
|
||||
rand = "0.8.5"
|
||||
libc = "0.2.150"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1"
|
|
@ -156,7 +156,7 @@ impl Vcpu for KvmVcpu {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::assert_matches::assert_matches;
|
||||
use assert_matches::assert_matches;
|
||||
use std::mem::size_of_val;
|
||||
use std::ptr::null_mut;
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ impl Vm for KvmVm {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::assert_matches::assert_matches;
|
||||
use assert_matches::assert_matches;
|
||||
use std::ptr::null_mut;
|
||||
|
||||
use libc::{mmap, MAP_ANONYMOUS, MAP_FAILED, MAP_PRIVATE, PROT_EXEC, PROT_READ, PROT_WRITE};
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#![feature(assert_matches)]
|
||||
#![feature(error_generic_member_access)]
|
||||
#![feature(pointer_is_aligned)]
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ where
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::assert_matches::assert_matches;
|
||||
use assert_matches::assert_matches;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ impl RamBus {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::assert_matches::assert_matches;
|
||||
use assert_matches::assert_matches;
|
||||
use std::io::{Read, Write};
|
||||
use std::mem::size_of;
|
||||
use std::ptr::null_mut;
|
||||
|
|
Loading…
Reference in a new issue