From dd3272fe909a19969fcd666fd639abd4a3a90e22 Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Sun, 20 Feb 2022 21:45:09 -0800 Subject: [PATCH] build: use `assert_matches` crate The `assert_matches` feature is nightly-only, so use this crate as a shim. --- Cargo.lock | 11 +++++++++-- lib/Cargo.toml | 1 + lib/src/lib.rs | 1 - lib/src/revset.rs | 2 +- lib/tests/test_merge_trees.rs | 5 +---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e6a4aa4d..f5a150c99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "atty" version = "0.2.14" @@ -588,6 +594,7 @@ dependencies = [ name = "jujutsu-lib" version = "0.2.0" dependencies = [ + "assert_matches", "backoff", "blake2", "byteorder", @@ -1426,9 +1433,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 961577c9b..40a7df8b8 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -40,5 +40,6 @@ whoami = "1.2.1" zstd = "0.10.0" [dev-dependencies] +assert_matches = "1.5.0" num_cpus = "1.13.1" test-case = "1.2.3" diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 6b1502dda..da9b4f27e 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![feature(assert_matches)] #![deny(unused_must_use)] #[macro_use] diff --git a/lib/src/revset.rs b/lib/src/revset.rs index 147316f84..c1347e0a8 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -1311,7 +1311,7 @@ pub fn revset_for_commits<'revset, 'repo: 'revset>( #[cfg(test)] mod tests { - use std::assert_matches::assert_matches; + use assert_matches::assert_matches; use super::*; diff --git a/lib/tests/test_merge_trees.rs b/lib/tests/test_merge_trees.rs index aa39bd511..af281ee30 100644 --- a/lib/tests/test_merge_trees.rs +++ b/lib/tests/test_merge_trees.rs @@ -12,10 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![feature(assert_matches)] - -use std::assert_matches::assert_matches; - +use assert_matches::assert_matches; use itertools::Itertools; use jujutsu_lib::backend::{ConflictPart, TreeValue}; use jujutsu_lib::commit_builder::CommitBuilder;