From 890b70212a0c0c0ea547cd37af307573f3603318 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Fri, 15 Dec 2023 15:10:54 -0500 Subject: [PATCH] Patch matches, mach --- Cargo.lock | 13 +++++++++---- Cargo.toml | 7 +++++++ patches/mach/Cargo.toml | 17 +++++++++++++++++ patches/mach/src/lib.rs | 1 + patches/matches/Cargo.toml | 14 ++++++++++++++ patches/matches/src/lib.rs | 1 + 6 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 patches/mach/Cargo.toml create mode 100644 patches/mach/src/lib.rs create mode 100644 patches/matches/Cargo.toml create mode 100644 patches/matches/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 725ab98b..e60bcf81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4014,8 +4014,15 @@ dependencies = [ [[package]] name = "mach" version = "0.3.2" +dependencies = [ + "mach2", +] + +[[package]] +name = "mach2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] @@ -4095,8 +4102,6 @@ dependencies = [ [[package]] name = "matches" version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" @@ -4703,7 +4708,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.43", diff --git a/Cargo.toml b/Cargo.toml index 9c5c2304..953e8f92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,8 +69,10 @@ members = [ "tests/reproducible-runtime", "patches/is-terminal", + "patches/matches", "patches/option-ext", "patches/directories-next", + "patches/mach", ] # Always compile Monero (and a variety of dependencies) with optimizations due @@ -102,6 +104,8 @@ dockertest = { git = "https://github.com/kayabaNerve/dockertest-rs", branch = "a # is-terminal now has an std-based solution with an equivalent API is-terminal = { path = "patches/is-terminal" } +# So does matches +matches = { path = "patches/matches" } # directories-next was created because directories was unmaintained # directories-next is now unmaintained while directories is maintained @@ -111,6 +115,9 @@ is-terminal = { path = "patches/is-terminal" } option-ext = { path = "patches/option-ext" } directories-next = { path = "patches/directories-next" } +# mach is unmaintained, so this wraps mach2 as mach +mach = { path = "patches/mach" } + [workspace.lints.clippy] unwrap_or_default = "allow" borrow_as_ptr = "deny" diff --git a/patches/mach/Cargo.toml b/patches/mach/Cargo.toml new file mode 100644 index 00000000..5cd6c89e --- /dev/null +++ b/patches/mach/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "mach" +version = "0.3.2" +description = "Replacement for mach which uses the mach2 implementation" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/mach" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" +rust-version = "1.56" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[dependencies] +mach2 = "0.4" diff --git a/patches/mach/src/lib.rs b/patches/mach/src/lib.rs new file mode 100644 index 00000000..22bb4fc3 --- /dev/null +++ b/patches/mach/src/lib.rs @@ -0,0 +1 @@ +pub use mach2::*; diff --git a/patches/matches/Cargo.toml b/patches/matches/Cargo.toml new file mode 100644 index 00000000..b3b16e8b --- /dev/null +++ b/patches/matches/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "matches" +version = "0.1.10" +description = "Replacement for the matches polyfill which uses the std impl" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/matches" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" +rust-version = "1.56" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/patches/matches/src/lib.rs b/patches/matches/src/lib.rs new file mode 100644 index 00000000..bbe0e81a --- /dev/null +++ b/patches/matches/src/lib.rs @@ -0,0 +1 @@ +pub use std::matches;