From 98f57a74d6119e72eee59eae6511ecfa06f29de0 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 4 Feb 2022 12:19:43 +0100 Subject: [PATCH] Cleanup (#36) * Fixup CI * Fix up README * Update dep/fixup metadata * Update CHANGELOG * Fix compile fail --- .github/workflows/ci.yml | 65 ++++++++++------------------------------ CHANGELOG.md | 5 ++++ Cargo.toml | 5 ++-- README.md | 5 ++-- src/builder.rs | 2 +- 5 files changed, 27 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94aeeb0..0288862 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ name: CI jobs: lint: name: Lint - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -21,33 +21,21 @@ jobs: # make sure all code has been formatted with rustfmt - run: rustup component add rustfmt - name: check rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check --color always + run: cargo fmt -- --check --color always # run clippy to verify we have no warnings - run: rustup component add clippy - - name: cargo fetch - uses: actions-rs/cargo@v1 - with: - command: fetch + - run: cargo fetch - name: cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets -- -D warnings + run: cargo clippy --all-targets -- -D warnings - name: cargo clippy all-features - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features -- -D warnings + run: cargo clippy --all-targets --all-features -- -D warnings test: name: Test strategy: matrix: - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-20.04, macOS-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -55,53 +43,32 @@ jobs: with: toolchain: stable override: true - - name: cargo fetch - uses: actions-rs/cargo@v1 - with: - command: fetch + - run: cargo fetch - name: cargo test build - uses: actions-rs/cargo@v1 - with: - command: build - args: --tests --release + run: cargo build --tests --release - name: cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --release + run: cargo test --release - name: cargo test build all-features - uses: actions-rs/cargo@v1 - with: - command: build - args: --tests --release --all-features + run: cargo build --tests --release --all-features - name: cargo test all-features - uses: actions-rs/cargo@v1 - with: - command: test - args: --release --all-features + run: cargo test --release --all-features deny-check: name: cargo-deny - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: EmbarkStudios/cargo-deny-action@v1 publish-check: name: Publish Check - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - - name: cargo fetch - uses: actions-rs/cargo@v1 - with: - command: fetch + - run: cargo fetch - name: cargo publish check - uses: actions-rs/cargo@v1 - with: - command: publish - args: --dry-run + run: cargo publish --dry-run diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e45fa7..c66d6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ + + # Changelog All notable changes to this project will be documented in this file. @@ -6,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - ReleaseDate +### Changed +- [PR#36](https://github.com/EmbarkStudios/krates/pull/36) updated `cfg-expr` and fixed up crates.io metadata. + ## [0.9.0] - 2021-10-21 ### Fixed - [PR#35](https://github.com/EmbarkStudios/krates/pull/35) changed `Krates::search_matches` to get rid of unnecessary lifetime coupling. diff --git a/Cargo.toml b/Cargo.toml index 16c4a68..c93cd43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,13 +6,14 @@ authors = [ "Embark ", "Jake Shadle ", ] -edition = "2018" +edition = "2021" repository = "https://github.com/EmbarkStudios/krates" license = "MIT OR Apache-2.0" readme = "README.md" documentation = "https://docs.rs/krates" homepage = "https://github.com/EmbarkStudios/krates" keywords = ["cargo", "metadata", "graph"] +categories = ["visualization"] [features] default = [] @@ -24,7 +25,7 @@ targets = ["cfg-expr/targets"] # Used for acquiring and/or deserializing `cargo metadata` output cargo_metadata = "0.14" # Used to parse and evaluate cfg() expressions for dependencies -cfg-expr = "0.9" +cfg-expr = "0.10" # Used to create and traverse graph structures petgraph = "0.6" # Used for checking version requirements diff --git a/README.md b/README.md index 5d8b995..05913fe 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![Crates.io](https://img.shields.io/crates/v/krates.svg)](https://crates.io/crates/krates) [![Docs](https://docs.rs/krates/badge.svg)](https://docs.rs/krates) [![dependency status](https://deps.rs/repo/github/EmbarkStudios/krates/status.svg)](https://deps.rs/repo/github/EmbarkStudios/krates) -[![Rust Version](https://img.shields.io/badge/Rust%20Version-1.50.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html) [![Build Status](https://github.com/EmbarkStudios/krates/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/krates/actions?workflow=CI) Creates graphs of crates from [cargo_metadata](https://crates.io/crates/cargo_metadata) metadata. @@ -74,8 +73,8 @@ Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how Licensed under either of -* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) -* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or ) at your option. diff --git a/src/builder.rs b/src/builder.rs index fd403f7..c3e0ea6 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -462,7 +462,7 @@ impl Builder { /// "wasm32-unknown-unknown", /// ]; /// - /// Builder::new().include_targets(targets.into_iter().map(|triple| { + /// Builder::new().include_targets(targets.iter().map(|triple| { /// if triple.starts_with("wasm32") { /// (*triple, vec!["atomics".to_owned()]) /// } else {