diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ccf50f1d..7f3fdf3a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Install nightly rust - run: rustup tolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c "rust-src clippy" + run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c "rust-src clippy" - name: Run Clippy run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module diff --git a/Cargo.toml b/Cargo.toml index 513b9413..c61ce6af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,6 +105,8 @@ sp-std = { git = "https://github.com/serai-dex/polkadot-sdk", branch = "experime # is-terminal now has an std-based solution with an equivalent API is-terminal = { path = "substrate/tree-cleanup/is-terminal" } +# So does matches +matches = { path = "substrate/tree-cleanup/matches" } # directories-next was created because directories was unmaintained # directories-next is now unmaintained while directories is maintained @@ -117,6 +119,9 @@ is-terminal = { path = "substrate/tree-cleanup/is-terminal" } option-ext = { path = "substrate/tree-cleanup/option-ext" } directories-next = { path = "substrate/tree-cleanup/directories-next" } +# mach is unmaintained, so this wraps mach2 as mach +mach = { path = "substrate/tree-cleanup/mach" } + # cargo believes the following are in-tree despite no features activating them # We provide empty crates to not only prove they're unused, yet also clean up # our Cargo.lock diff --git a/substrate/tree-cleanup/mach/Cargo.toml b/substrate/tree-cleanup/mach/Cargo.toml new file mode 100644 index 00000000..58945e51 --- /dev/null +++ b/substrate/tree-cleanup/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/substrate/tree-cleanup/mach" +authors = ["Luke Parker <lukeparker5132@gmail.com>"] +keywords = [] +edition = "2021" +rust-version = "1.242" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[dependencies] +mach2 = "0.4" diff --git a/substrate/tree-cleanup/mach/src/lib.rs b/substrate/tree-cleanup/mach/src/lib.rs new file mode 100644 index 00000000..22bb4fc3 --- /dev/null +++ b/substrate/tree-cleanup/mach/src/lib.rs @@ -0,0 +1 @@ +pub use mach2::*; diff --git a/substrate/tree-cleanup/matches/Cargo.toml b/substrate/tree-cleanup/matches/Cargo.toml new file mode 100644 index 00000000..27d94657 --- /dev/null +++ b/substrate/tree-cleanup/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/substrate/tree-cleanup/matches" +authors = ["Luke Parker <lukeparker5132@gmail.com>"] +keywords = [] +edition = "2021" +rust-version = "1.56" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/substrate/tree-cleanup/matches/src/lib.rs b/substrate/tree-cleanup/matches/src/lib.rs new file mode 100644 index 00000000..bbe0e81a --- /dev/null +++ b/substrate/tree-cleanup/matches/src/lib.rs @@ -0,0 +1 @@ +pub use std::matches;