diff --git a/.github/renovate.json5 b/.github/renovate.json5 index cc1fefc3..c02c2a6d 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,4 +1,5 @@ { + extends: ["helpers:pinGitHubActionDigests"], schedule: [ 'before 5am on the first day of the month', ], @@ -64,12 +65,23 @@ matchDepNames: [ 'prek', ], - extractVersion: '^(?\\d+\\.\\d+\\.\\d+)', + extractVersion: '^v(?\\d+\\.\\d+\\.\\d+)', schedule: [ '* * * * *', ], automerge: true, }, + { + matchManagers: [ + 'github-actions', + ], + matchUpdateTypes: [ + 'minor', + 'patch', + ], + automerge: true, + groupName: 'compatible (actions)', + }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies // - Take advantage of latest dev-dependencies diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 7446e08e..8158c030 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -1,13 +1,10 @@ -name: Security audit +name: Audit permissions: contents: read on: pull_request: - paths: - - '**/Cargo.toml' - - '**/Cargo.lock' push: branches: - main @@ -22,19 +19,38 @@ concurrency: cancel-in-progress: true jobs: - security_audit: + audit: + permissions: + contents: none + name: Audit + needs: [advisories, cargo_deny, actions] + runs-on: ubuntu-latest + if: "always()" + steps: + - name: Failed + run: exit 1 + if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')" + advisories: permissions: issues: write # to create issues (actions-rs/audit-check) checks: write # to create check (actions-rs/audit-check) runs-on: ubuntu-latest # Prevent sudden announcement of a new advisory from failing ci: continue-on-error: true + strategy: + matrix: + checks: + - advisories steps: - name: Checkout repository - uses: actions/checkout@v6 - - uses: actions-rs/audit-check@v1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Lint advisories + uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2.0.15 with: - token: ${{ secrets.GITHUB_TOKEN }} + command: check ${{ matrix.checks }} + rust-version: stable cargo_deny: permissions: @@ -46,8 +62,26 @@ jobs: checks: - bans licenses sources steps: - - uses: actions/checkout@v6 - - uses: EmbarkStudios/cargo-deny-action@v2 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Lint bans + uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2.0.15 with: command: check ${{ matrix.checks }} rust-version: stable + + actions: + runs-on: ubuntu-latest + permissions: + security-events: write + contents: read # only needed for private or internal repos + actions: read # only needed for private or internal repos + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Run zizmor + uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 992a145e..e322d06d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,14 +43,20 @@ jobs: CARGO_PROFILE_DEV_DEBUG: line-tables-only steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: ${{ matrix.rust }} components: rustfmt - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cargo-hack + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + - name: Install cargo-hack + uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4 + with: + tool: cargo-hack - name: Build run: cargo test --workspace --no-run - name: Test @@ -63,13 +69,19 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cargo-hack + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + - name: Install cargo-hack + uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4 + with: + tool: cargo-hack - name: Default features run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --keep-going minimal-versions: @@ -80,13 +92,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install stable Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable - name: Install nightly Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: nightly - name: Downgrade dependencies to minimal versions @@ -97,12 +111,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable - - uses: Swatinem/rust-cache@v2 + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: "Is lockfile updated?" run: cargo update --workspace --locked docs: @@ -110,12 +127,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: "1.95" # STABLE - - uses: Swatinem/rust-cache@v2 + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: Check documentation env: RUSTDOCFLAGS: -D warnings @@ -125,13 +145,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: "1.95" # STABLE components: rustfmt - - uses: Swatinem/rust-cache@v2 + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: Check formatting run: cargo fmt --check clippy: @@ -141,13 +164,16 @@ jobs: security-events: write # to upload sarif results steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: "1.95" # STABLE components: clippy - - uses: Swatinem/rust-cache@v2 + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: Install SARIF tools run: cargo install clippy-sarif --locked - name: Install SARIF tools @@ -160,7 +186,7 @@ jobs: | sarif-fmt continue-on-error: true - name: Upload - uses: github/codeql-action/upload-sarif@v4 + uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1 with: sarif_file: clippy-results.sarif wait-for-processing: true @@ -171,18 +197,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable - components: rustfmt - - uses: Swatinem/rust-cache@v2 + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: Install cargo-tarpaulin run: cargo install cargo-tarpaulin - name: Gather coverage run: cargo tarpaulin --output-dir coverage --out lcov - name: Publish to Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/committed.yml b/.github/workflows/committed.yml index 9138a8e3..3f18252e 100644 --- a/.github/workflows/committed.yml +++ b/.github/workflows/committed.yml @@ -20,9 +20,10 @@ jobs: name: Lint Commits runs-on: ubuntu-latest steps: - - name: Checkout Actions Repository - uses: actions/checkout@v6 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Lint Commits - uses: crate-ci/committed@master + uses: crate-ci/committed@faeed42f2e10c244533a01525f13c4d8b6ce383f # v1.11.1 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1a96a38b..b3d501ca 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -22,7 +22,11 @@ jobs: contents: read runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: j178/prek-action@v2 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - prek-version: '0.2.27' + persist-credentials: false + - name: prek + uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1 + with: + prek-version: '0.3.11' diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index c9ed9c07..c46d47ef 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -33,14 +33,20 @@ jobs: CARGO_PROFILE_DEV_DEBUG: line-tables-only steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: ${{ matrix.rust }} components: rustfmt - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cargo-hack + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + - name: Install cargo-hack + uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4 + with: + tool: cargo-hack - name: Build run: cargo test --workspace --no-run - name: Test @@ -55,14 +61,20 @@ jobs: CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: allow steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable components: rustfmt - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@cargo-hack + - name: Initialize cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + - name: Install cargo-hack + uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4 + with: + tool: cargo-hack - name: Update dependencies run: cargo update - name: Build diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index cf4c1bfb..37a8847f 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -20,6 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Spell Check Repo - uses: crate-ci/typos@master + uses: crate-ci/typos@bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0 diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml index 1d4fd850..0ca8d2d5 100644 --- a/.github/workflows/template.yml +++ b/.github/workflows/template.yml @@ -28,12 +28,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: true # to push the branch and create PR - name: Configure git run: | - git config --global user.name '${{ github.actor }}' + git config --global user.name '${GITHUB_ACTOR}' git config --global user.email '<>' - name: Fetch template run: "git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}" diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 00000000..45aa9c94 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,4 @@ +rules: + superfluous-actions: + # https://github.com/zizmorcore/zizmor/issues/1817 + disable: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbd1af3f..193a302b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,7 @@ repos: rev: v1.1.11 hooks: - id: committed + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.22.0 + hooks: + - id: zizmor diff --git a/Cargo.toml b/Cargo.toml index 4fcfeed9..77b9e1fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,17 +8,20 @@ license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.66.0" # MSRV include = [ - "build.rs", - "src/**/*", - "Cargo.toml", - "Cargo.lock", - "LICENSE*", - "README.md", - "examples/**/*" + "/build.rs", + "/src/**/*", + "/Cargo.toml", + "/Cargo.lock", + "/LICENSE*", + "/README.md", + "/examples/**/*" ] [workspace.lints.rust] rust_2018_idioms = { level = "warn", priority = -1 } + +non_ascii_idents = "warn" +trivial_numeric_casts = "warn" unnameable_types = "warn" unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" @@ -27,10 +30,16 @@ unused_macro_rules = "warn" unused_qualifications = "warn" [workspace.lints.clippy] +allow_attributes_without_reason = "warn" bool_assert_comparison = "allow" branches_sharing_code = "allow" +# cast_possible_truncation = "warn" +cast_possible_wrap = "warn" +# cast_sign_loss = "warn" checked_conversions = "warn" collapsible_else_if = "allow" +collapsible_match = "allow" +collection_is_never_read = "warn" create_dir = "warn" dbg_macro = "warn" debug_assert_with_mut_call = "warn" @@ -43,8 +52,10 @@ explicit_into_iter_loop = "warn" fallible_impl_from = "warn" filter_map_next = "warn" flat_map_option = "warn" +float_cmp = "warn" float_cmp_const = "warn" fn_params_excessive_bools = "warn" +fn_to_numeric_cast_any = "warn" from_iter_instead_of_collect = "warn" if_same_then_else = "allow" implicit_clone = "warn" @@ -61,10 +72,12 @@ linkedlist = "warn" lossy_float_literal = "warn" macro_use_imports = "warn" mem_forget = "warn" +mismatching_type_param_order = "warn" mutex_integer = "warn" needless_continue = "allow" needless_for_each = "warn" negative_feature_names = "warn" +partial_pub_fields = "warn" path_buf_push_overwrite = "warn" ptr_as_ptr = "warn" rc_mutex = "warn" @@ -75,13 +88,19 @@ result_large_err = "allow" same_functions_in_if_condition = "warn" self_named_module_files = "warn" semicolon_if_nothing_returned = "warn" +should_panic_without_expect = "warn" str_to_string = "warn" string_add = "warn" string_add_assign = "warn" string_lit_as_bytes = "warn" todo = "warn" trait_duplication_in_bounds = "warn" +# undocumented_unsafe_blocks = "warn" uninlined_format_args = "warn" +unnecessary_safety_comment = "warn" +unnecessary_safety_doc = "warn" +unseparated_literal_suffix = "warn" +use_self = "warn" verbose_file_reads = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" diff --git a/crates/anstream/Cargo.toml b/crates/anstream/Cargo.toml index 5a02365c..7e7dff9a 100644 --- a/crates/anstream/Cargo.toml +++ b/crates/anstream/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] diff --git a/crates/anstream/examples/dump-stream.rs b/crates/anstream/examples/dump-stream.rs index 18bd2eb2..0bfb37f4 100644 --- a/crates/anstream/examples/dump-stream.rs +++ b/crates/anstream/examples/dump-stream.rs @@ -76,7 +76,7 @@ impl Args { fn parse() -> Result { use lexopt::prelude::*; - let mut res = Args::default(); + let mut res = Self::default(); let mut args = lexopt::Parser::from_env(); while let Some(arg) = args.next()? { diff --git a/crates/anstream/src/auto.rs b/crates/anstream/src/auto.rs index 16c995d0..a798c13a 100644 --- a/crates/anstream/src/auto.rs +++ b/crates/anstream/src/auto.rs @@ -102,7 +102,7 @@ where #[inline] fn always_ansi_(raw: S) -> Self { let inner = StreamInner::PassThrough(raw); - AutoStream { inner } + Self { inner } } /// Force color, no matter what the inner `Write` supports. @@ -129,7 +129,7 @@ where #[inline] pub fn never(raw: S) -> Self { let inner = StreamInner::Strip(StripStream::new(raw)); - AutoStream { inner } + Self { inner } } #[inline] diff --git a/crates/anstream/src/fmt.rs b/crates/anstream/src/fmt.rs index e673c26d..a08d6d7d 100644 --- a/crates/anstream/src/fmt.rs +++ b/crates/anstream/src/fmt.rs @@ -14,7 +14,7 @@ where W: FnMut(&[u8]) -> std::io::Result<()>, { pub(crate) fn new(writer: W) -> Self { - Adapter { + Self { writer, error: Ok(()), } diff --git a/crates/anstream/tests/macros.rs b/crates/anstream/tests/macros.rs index f9df09c7..e5fa8a01 100644 --- a/crates/anstream/tests/macros.rs +++ b/crates/anstream/tests/macros.rs @@ -40,7 +40,7 @@ fn eprintln() { #[test] #[cfg(feature = "auto")] -#[should_panic] +#[should_panic = "This should be captured"] fn panic() { anstream::panic!( "{}This should be captured{}", diff --git a/crates/anstyle-ansi-term/Cargo.toml b/crates/anstyle-ansi-term/Cargo.toml index 67095c0f..f947d7c1 100644 --- a/crates/anstyle-ansi-term/Cargo.toml +++ b/crates/anstyle-ansi-term/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-crossterm/Cargo.toml b/crates/anstyle-crossterm/Cargo.toml index 756f6ebb..09cc7a23 100644 --- a/crates/anstyle-crossterm/Cargo.toml +++ b/crates/anstyle-crossterm/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-git/Cargo.toml b/crates/anstyle-git/Cargo.toml index 3f8d88d2..5e448d89 100644 --- a/crates/anstyle-git/Cargo.toml +++ b/crates/anstyle-git/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-hyperlink/Cargo.toml b/crates/anstyle-hyperlink/Cargo.toml index 0ddef198..b78562bb 100644 --- a/crates/anstyle-hyperlink/Cargo.toml +++ b/crates/anstyle-hyperlink/Cargo.toml @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] diff --git a/crates/anstyle-lossy/Cargo.toml b/crates/anstyle-lossy/Cargo.toml index 319d36b6..f742d411 100644 --- a/crates/anstyle-lossy/Cargo.toml +++ b/crates/anstyle-lossy/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-ls/Cargo.toml b/crates/anstyle-ls/Cargo.toml index e9845c42..a0e10fef 100644 --- a/crates/anstyle-ls/Cargo.toml +++ b/crates/anstyle-ls/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-owo-colors/Cargo.toml b/crates/anstyle-owo-colors/Cargo.toml index db6d4e10..9a7cdff6 100644 --- a/crates/anstyle-owo-colors/Cargo.toml +++ b/crates/anstyle-owo-colors/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-parse/Cargo.toml b/crates/anstyle-parse/Cargo.toml index 4521eec7..03e97792 100644 --- a/crates/anstyle-parse/Cargo.toml +++ b/crates/anstyle-parse/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-parse/tests/testsuite.rs b/crates/anstyle-parse/tests/testsuite.rs index 2aa63a0d..e005ffa3 100644 --- a/crates/anstyle-parse/tests/testsuite.rs +++ b/crates/anstyle-parse/tests/testsuite.rs @@ -73,7 +73,7 @@ impl std::ops::Deref for Dispatcher { impl std::ops::Add for Dispatcher where - D: Into, + D: Into, { type Output = Self; fn add(mut self, rhs: D) -> Self::Output { @@ -84,7 +84,7 @@ where impl From> for Dispatcher { fn from(seq: Vec) -> Self { - Dispatcher { dispatched: seq } + Self { dispatched: seq } } } diff --git a/crates/anstyle-progress/Cargo.toml b/crates/anstyle-progress/Cargo.toml index f648fb5c..15389687 100644 --- a/crates/anstyle-progress/Cargo.toml +++ b/crates/anstyle-progress/Cargo.toml @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] diff --git a/crates/anstyle-query/Cargo.toml b/crates/anstyle-query/Cargo.toml index 084f20f5..75b20fec 100644 --- a/crates/anstyle-query/Cargo.toml +++ b/crates/anstyle-query/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [target.'cfg(windows)'.dependencies] diff --git a/crates/anstyle-roff/Cargo.toml b/crates/anstyle-roff/Cargo.toml index 27c2cfe2..8ad829b7 100644 --- a/crates/anstyle-roff/Cargo.toml +++ b/crates/anstyle-roff/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-svg/Cargo.toml b/crates/anstyle-svg/Cargo.toml index acba2d5b..a15fb76a 100644 --- a/crates/anstyle-svg/Cargo.toml +++ b/crates/anstyle-svg/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-syntect/Cargo.toml b/crates/anstyle-syntect/Cargo.toml index d9580bb0..106d6e1b 100644 --- a/crates/anstyle-syntect/Cargo.toml +++ b/crates/anstyle-syntect/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-termcolor/Cargo.toml b/crates/anstyle-termcolor/Cargo.toml index 56b7473e..1d0c5610 100644 --- a/crates/anstyle-termcolor/Cargo.toml +++ b/crates/anstyle-termcolor/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-wincon/Cargo.toml b/crates/anstyle-wincon/Cargo.toml index 15d8c4be..84fb3081 100644 --- a/crates/anstyle-wincon/Cargo.toml +++ b/crates/anstyle-wincon/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] targets = ["x86_64-pc-windows-msvc"] [package.metadata.release] @@ -21,7 +21,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle-wincon/examples/dump-wincon.rs b/crates/anstyle-wincon/examples/dump-wincon.rs index fce11c69..b033f21c 100644 --- a/crates/anstyle-wincon/examples/dump-wincon.rs +++ b/crates/anstyle-wincon/examples/dump-wincon.rs @@ -88,7 +88,7 @@ impl Args { fn parse() -> Result { use lexopt::prelude::*; - let mut res = Args::default(); + let mut res = Self::default(); let mut args = lexopt::Parser::from_env(); while let Some(arg) = args.next()? { diff --git a/crates/anstyle-wincon/examples/set-wincon.rs b/crates/anstyle-wincon/examples/set-wincon.rs index 14224d9f..66768ea5 100644 --- a/crates/anstyle-wincon/examples/set-wincon.rs +++ b/crates/anstyle-wincon/examples/set-wincon.rs @@ -36,7 +36,7 @@ impl Args { fn parse() -> Result { use lexopt::prelude::*; - let mut res = Args::default(); + let mut res = Self::default(); let mut args = lexopt::Parser::from_env(); while let Some(arg) = args.next()? { diff --git a/crates/anstyle-yansi/Cargo.toml b/crates/anstyle-yansi/Cargo.toml index ac6f5d04..0b100039 100644 --- a/crates/anstyle-yansi/Cargo.toml +++ b/crates/anstyle-yansi/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/anstyle/Cargo.toml b/crates/anstyle/Cargo.toml index 8f532a45..f0546174 100644 --- a/crates/anstyle/Cargo.toml +++ b/crates/anstyle/Cargo.toml @@ -21,7 +21,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [features] diff --git a/crates/anstyle/examples/dump-style.rs b/crates/anstyle/examples/dump-style.rs index 2e539eb6..f154afea 100644 --- a/crates/anstyle/examples/dump-style.rs +++ b/crates/anstyle/examples/dump-style.rs @@ -80,7 +80,7 @@ impl Args { fn parse() -> Result { use lexopt::prelude::*; - let mut res = Args::default(); + let mut res = Self::default(); let mut args = lexopt::Parser::from_env(); while let Some(arg) = args.next()? { diff --git a/crates/anstyle/src/color.rs b/crates/anstyle/src/color.rs index 828f9f05..5e3b46e8 100644 --- a/crates/anstyle/src/color.rs +++ b/crates/anstyle/src/color.rs @@ -19,7 +19,7 @@ pub enum Color { impl Color { /// Create a [`Style`][crate::Style] with this as the foreground #[inline] - pub fn on(self, background: impl Into) -> crate::Style { + pub fn on(self, background: impl Into) -> crate::Style { crate::Style::new() .fg_color(Some(self)) .bg_color(Some(background.into())) diff --git a/crates/anstyle/src/effect.rs b/crates/anstyle/src/effect.rs index 4a076d4e..73b16181 100644 --- a/crates/anstyle/src/effect.rs +++ b/crates/anstyle/src/effect.rs @@ -10,32 +10,32 @@ pub struct Effects(u16); impl Effects { /// No [`Effects`] applied - const PLAIN: Self = Effects(0); + const PLAIN: Self = Self(0); #[allow(missing_docs)] - pub const BOLD: Self = Effects(1 << 0); + pub const BOLD: Self = Self(1 << 0); #[allow(missing_docs)] - pub const DIMMED: Self = Effects(1 << 1); + pub const DIMMED: Self = Self(1 << 1); /// Not widely supported. Sometimes treated as inverse or blink - pub const ITALIC: Self = Effects(1 << 2); + pub const ITALIC: Self = Self(1 << 2); /// Style extensions exist for Kitty, VTE, mintty and iTerm2. - pub const UNDERLINE: Self = Effects(1 << 3); + pub const UNDERLINE: Self = Self(1 << 3); #[allow(missing_docs)] - pub const DOUBLE_UNDERLINE: Self = Effects(1 << 4); + pub const DOUBLE_UNDERLINE: Self = Self(1 << 4); #[allow(missing_docs)] - pub const CURLY_UNDERLINE: Self = Effects(1 << 5); + pub const CURLY_UNDERLINE: Self = Self(1 << 5); #[allow(missing_docs)] - pub const DOTTED_UNDERLINE: Self = Effects(1 << 6); + pub const DOTTED_UNDERLINE: Self = Self(1 << 6); #[allow(missing_docs)] - pub const DASHED_UNDERLINE: Self = Effects(1 << 7); + pub const DASHED_UNDERLINE: Self = Self(1 << 7); #[allow(missing_docs)] - pub const BLINK: Self = Effects(1 << 8); + pub const BLINK: Self = Self(1 << 8); /// Swap foreground and background colors; inconsistent emulation - pub const INVERT: Self = Effects(1 << 9); + pub const INVERT: Self = Self(1 << 9); #[allow(missing_docs)] - pub const HIDDEN: Self = Effects(1 << 10); + pub const HIDDEN: Self = Self(1 << 10); /// Characters legible but marked as if for deletion. Not supported in Terminal.app - pub const STRIKETHROUGH: Self = Effects(1 << 11); + pub const STRIKETHROUGH: Self = Self(1 << 11); /// No effects enabled /// @@ -77,7 +77,7 @@ impl Effects { /// assert!(!effects.contains(anstyle::Effects::BOLD)); /// ``` #[inline(always)] - pub const fn contains(self, other: Effects) -> bool { + pub const fn contains(self, other: Self) -> bool { (other.0 & self.0) == other.0 } @@ -94,7 +94,7 @@ impl Effects { /// ``` #[inline(always)] #[must_use] - pub const fn insert(mut self, other: Effects) -> Self { + pub const fn insert(mut self, other: Self) -> Self { self.0 |= other.0; self } @@ -110,7 +110,7 @@ impl Effects { /// ``` #[inline(always)] #[must_use] - pub const fn remove(mut self, other: Effects) -> Self { + pub const fn remove(mut self, other: Self) -> Self { self.0 &= !other.0; self } diff --git a/crates/colorchoice-clap/Cargo.toml b/crates/colorchoice-clap/Cargo.toml index 1189be27..c4cee0c7 100644 --- a/crates/colorchoice-clap/Cargo.toml +++ b/crates/colorchoice-clap/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [dependencies] diff --git a/crates/colorchoice/Cargo.toml b/crates/colorchoice/Cargo.toml index eb88be49..f28fe9ee 100644 --- a/crates/colorchoice/Cargo.toml +++ b/crates/colorchoice/Cargo.toml @@ -12,7 +12,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ @@ -20,7 +20,7 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, - {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: {{repository}}/compare/{{tag_name}}...HEAD", exactly=1}, ] [lints] diff --git a/deny.toml b/deny.toml index 27bf59a8..c617b413 100644 --- a/deny.toml +++ b/deny.toml @@ -97,6 +97,7 @@ allow = [ "OpenSSL", "Zlib", "NCSA", + "CDLA-Permissive-2.0", ] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the