Bug 1817900 - Update matches to 0.1.10. r=emilio,supply-chain-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D170442
This commit is contained in:
Mike Hommey 2023-02-23 01:17:29 +00:00
Родитель 32650add16
Коммит 32473816f4
6 изменённых файлов: 54 добавлений и 10 удалений

4
Cargo.lock сгенерированный
Просмотреть файл

@ -3211,9 +3211,9 @@ dependencies = [
[[package]]
name = "matches"
version = "0.1.9"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
[[package]]
name = "maybe-uninit"

Просмотреть файл

@ -1394,6 +1394,11 @@ criteria = "safe-to-deploy"
version = "0.1.9"
notes = "This is a trivial crate."
[[audits.matches]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.1.9 -> 0.1.10"
[[audits.memmap2]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"

Просмотреть файл

@ -1 +1 @@
{"files":{"Cargo.toml":"194024a82bba1c84226ac827330511fba74474a7914b1319e6700285c15f5812","LICENSE":"d7b49708075b5f43f8e108464f1970c8c66fa8b6afce4f9c944da3af77cc1460","lib.rs":"9f4187510972f5fc356ca60d19daa0e69643dd6b530edf7c928cbd75a2b990c5","tests/macro_use_one.rs":"4f599fae16f1aef369050bf0ad74cbefec06c430b29e0c9ab0811ac9592e997a","tests/use_star.rs":"39a23b8002544f65e7a896e2cefe8e0af7404151fa65d327e748f5c1101badf8"},"package":"a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"}
{"files":{"Cargo.toml":"31b6fb9ee5ecddc429d13300336509fd7d199aa316375c00b581d60533b8ed43","LICENSE":"d7b49708075b5f43f8e108464f1970c8c66fa8b6afce4f9c944da3af77cc1460","README.md":"096bf8a54bac9e0fe42720d12aa40a2d3a6e78293c1bd8895f6bd9350a7fc224","lib.rs":"c6d14b7899277e45ac5f46d95f87c91ed0e5118db3b377e0914799d0e252650a","tests/macro_use_one.rs":"4f599fae16f1aef369050bf0ad74cbefec06c430b29e0c9ab0811ac9592e997a","tests/use_star.rs":"39a23b8002544f65e7a896e2cefe8e0af7404151fa65d327e748f5c1101badf8"},"package":"2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"}

13
third_party/rust/matches/Cargo.toml поставляемый
Просмотреть файл

@ -3,19 +3,18 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
# editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
name = "matches"
version = "0.1.9"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
version = "0.1.10"
description = "A macro to evaluate, as a boolean, whether an expression matches a pattern."
documentation = "https://docs.rs/matches/"
readme = "README.md"
license = "MIT"
repository = "https://github.com/SimonSapin/rust-std-candidates"

7
third_party/rust/matches/README.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,7 @@
A macro to evaluate, as a boolean, whether an expression matches a pattern.
For users who build using only Rust 1.42 and newer, consider using [`std::matches`], which
is included in the [standard library prelude] and thus is automatically in scope.
[`std::matches`]: core::matches
[standard library prelude]: https://doc.rust-lang.org/stable/reference/names/preludes.html

33
third_party/rust/matches/lib.rs поставляемый
Просмотреть файл

@ -1,4 +1,37 @@
#![no_std]
//! A macro to evaluate, as a boolean, whether an expression matches a pattern.
//!
//! For users who build using only Rust 1.42 and newer, consider using [`std::matches`], which
//! is included in the [standard library prelude] and thus is automatically in scope.
//!
//! [`std::matches`]: core::matches
//! [standard library prelude]: https://doc.rust-lang.org/stable/reference/names/preludes.html
//!
//! # Examples
//!
//! ```
//! #[macro_use]
//! extern crate matches;
//!
//! #[derive(Debug)]
//! pub enum Foo<T> {
//! A,
//! B(T),
//! }
//!
//! impl<T> Foo<T> {
//! pub fn is_b(&self) -> bool {
//! matches!(*self, Foo::B(_))
//! }
//! }
//!
//! impl<T: core::fmt::Debug> Foo<T> {
//! pub fn assert_is_b(&self) {
//! assert_matches!(&self, Foo::B(_));
//! }
//! }
//! # fn main() { }
//! ```
/// Check if an expression matches a refutable pattern.
///