From 5109b63f728f871c22b0dc32544da10c754a0242 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 08:10:37 +0000 Subject: [PATCH 1/4] chore(deps): Bump rubocop in the bundler-deps group across 1 directory Bumps the bundler-deps group with 1 update in the / directory: [rubocop](https://github.com/rubocop/rubocop). Updates `rubocop` from 1.66.1 to 1.69.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.66.1...v1.69.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler-deps ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index 0d7f5c51..ec7ae14d 100644 --- a/Gemfile +++ b/Gemfile @@ -4,5 +4,5 @@ source 'https://rubygems.org' gem 'bundler-audit', '~> 0.9', require: false gem 'rake', '>= 12.3.3', require: false -gem 'rubocop', '~> 1.66', require: false +gem 'rubocop', '~> 1.69', require: false gem 'rubocop-rake', '~> 0.6', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 29018c0b..0edf838c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,33 +5,35 @@ GEM bundler-audit (0.9.2) bundler (>= 1.2.0, < 3) thor (~> 1.0) - json (2.7.2) + json (2.8.2) language_server-protocol (3.17.0.3) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.2) - rubocop (1.66.1) + regexp_parser (2.9.3) + rubocop (1.69.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + rubocop-ast (>= 1.36.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.3) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) rubocop-rake (0.6.0) rubocop (~> 1.0) ruby-progressbar (1.13.0) thor (1.3.2) - unicode-display_width (2.6.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) PLATFORMS ruby @@ -39,7 +41,7 @@ PLATFORMS DEPENDENCIES bundler-audit (~> 0.9) rake (>= 12.3.3) - rubocop (~> 1.66) + rubocop (~> 1.69) rubocop-rake (~> 0.6) BUNDLED WITH From 85c7541bb2253577a6957b3ef55f782d8aaad790 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 08:17:20 +0000 Subject: [PATCH 2/4] chore(deps): Bump the gha-deps group across 1 directory with 5 updates Bumps the gha-deps group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.0` | `4.2.2` | | [ruby/setup-ruby](https://github.com/ruby/setup-ruby) | `1.194.0` | `1.202.0` | | [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action) | `2.0.1` | `2.0.3` | | [actions/setup-node](https://github.com/actions/setup-node) | `4.0.4` | `4.1.0` | | [crazy-max/ghaction-github-labeler](https://github.com/crazy-max/ghaction-github-labeler) | `5.0.0` | `5.1.0` | Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.0...v4.2.2) Updates `ruby/setup-ruby` from 1.194.0 to 1.202.0 - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/c04af2bb7258bb6a03df1d3c1865998ac9390972...a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc) Updates `EmbarkStudios/cargo-deny-action` from 2.0.1 to 2.0.3 - [Release notes](https://github.com/embarkstudios/cargo-deny-action/releases) - [Commits](https://github.com/embarkstudios/cargo-deny-action/compare/8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268...2d8c9929d8f9f42bedba73f1287cb0b479f07acb) Updates `actions/setup-node` from 4.0.4 to 4.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4.0.4...v4.1.0) Updates `crazy-max/ghaction-github-labeler` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/crazy-max/ghaction-github-labeler/releases) - [Commits](https://github.com/crazy-max/ghaction-github-labeler/compare/de749cf181958193cb7debf1a9c5bb28922f3e1b...b54af0c25861143e7c8813d7cbbf46d2c341680c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: gha-deps - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gha-deps - dependency-name: EmbarkStudios/cargo-deny-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: gha-deps - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gha-deps - dependency-name: crazy-max/ghaction-github-labeler dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gha-deps ... Signed-off-by: dependabot[bot] --- .github/workflows/audit.yaml | 8 ++++---- .github/workflows/ci.yaml | 18 +++++++++--------- .github/workflows/code-coverage.yaml | 2 +- .github/workflows/markdown-link-check.yaml | 2 +- .github/workflows/miri.yaml | 2 +- .github/workflows/repo-labels.yaml | 4 ++-- .github/workflows/rustdoc.yaml | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 49961a32..7161880a 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Ruby toolchain - uses: ruby/setup-ruby@c04af2bb7258bb6a03df1d3c1865998ac9390972 # v1.194.0 + uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ".ruby-version" bundler-cache: true @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/audit@v1.12.1 @@ -52,7 +52,7 @@ jobs: cargo generate-lockfile --verbose fi - - uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 # v2.0.1 + - uses: EmbarkStudios/cargo-deny-action@2d8c9929d8f9f42bedba73f1287cb0b479f07acb # v2.0.3 with: arguments: --locked --all-features command: check ${{ matrix.checks }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a5edba36..53b7fe84 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,7 +29,7 @@ jobs: RUST_BACKTRACE: 1 steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/build-and-test@v1.12.1 @@ -68,7 +68,7 @@ jobs: RUST_BACKTRACE: 1 steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/build-and-test@v1.12.1 @@ -104,7 +104,7 @@ jobs: RUST_BACKTRACE: 1 steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/build-and-test@v1.12.1 @@ -142,7 +142,7 @@ jobs: RUST_BACKTRACE: 1 steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/build-and-test@v1.12.1 @@ -163,7 +163,7 @@ jobs: RUST_BACKTRACE: 1 steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/lint-and-format@v1.12.1 @@ -186,10 +186,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Ruby toolchain - uses: ruby/setup-ruby@c04af2bb7258bb6a03df1d3c1865998ac9390972 # v1.194.0 + uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: ruby-version: ".ruby-version" bundler-cache: true @@ -202,10 +202,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Setup Node.js runtime - uses: actions/setup-node@v4.0.4 + uses: actions/setup-node@v4.1.0 with: node-version: "lts/*" diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml index fe542471..b13f39ae 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/code-coverage.yaml @@ -20,7 +20,7 @@ jobs: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install nightly Rust toolchain uses: artichoke/setup-rust/code-coverage@v1.12.1 diff --git a/.github/workflows/markdown-link-check.yaml b/.github/workflows/markdown-link-check.yaml index 4b7ad63f..e515e228 100644 --- a/.github/workflows/markdown-link-check.yaml +++ b/.github/workflows/markdown-link-check.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Check for broken links in markdown files uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # v1.0.15 diff --git a/.github/workflows/miri.yaml b/.github/workflows/miri.yaml index a1265e02..2fb371dc 100644 --- a/.github/workflows/miri.yaml +++ b/.github/workflows/miri.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/miri@v1.12.1 diff --git a/.github/workflows/repo-labels.yaml b/.github/workflows/repo-labels.yaml index bdeb52dd..65d29cc6 100644 --- a/.github/workflows/repo-labels.yaml +++ b/.github/workflows/repo-labels.yaml @@ -20,10 +20,10 @@ jobs: name: Synchronize repository labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - name: Sync GitHub Issue Labels - uses: crazy-max/ghaction-github-labeler@de749cf181958193cb7debf1a9c5bb28922f3e1b # v5.0.0 + uses: crazy-max/ghaction-github-labeler@b54af0c25861143e7c8813d7cbbf46d2c341680c # v5.1.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} yaml-file: .github/labels.yaml diff --git a/.github/workflows/rustdoc.yaml b/.github/workflows/rustdoc.yaml index bac92db3..9ca2fbf0 100644 --- a/.github/workflows/rustdoc.yaml +++ b/.github/workflows/rustdoc.yaml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.2 - name: Install Rust toolchain uses: artichoke/setup-rust/rustdoc@v1.12.1 From c182c8bc70cf3308010e5de8d04dafb13e78075a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 08:25:14 +0000 Subject: [PATCH 3/4] chore(deps-dev): Bump prettier from 3.2.5 to 3.4.1 in the npm-deps group Bumps the npm-deps group with 1 update: [prettier](https://github.com/prettier/prettier). Updates `prettier` from 3.2.5 to 3.4.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.4.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-deps ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 033bed95..da2cfb94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,13 +8,13 @@ "name": "@artichokeruby/intaglio", "version": "0.0.0", "devDependencies": { - "prettier": "^3.2.5" + "prettier": "^3.4.1" } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 1f5c51b0..b6217921 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "homepage": "https://www.artichokeruby.org", "bugs": "https://github.com/artichoke/intaglio/issues", "devDependencies": { - "prettier": "^3.2.5" + "prettier": "^3.4.1" }, "scripts": { "fmt": "prettier --write \"**/*\"" From 13ff3013e767bcf657ecda1a5bf5af22bffede58 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Sun, 8 Dec 2024 13:58:50 -0800 Subject: [PATCH 4/4] Update Ruby and bundler, bump MSRV to 1.76.0 Address new lints now that MSRV is higher. --- .github/workflows/ci.yaml | 2 +- .ruby-version | 2 +- Cargo.toml | 6 +++--- Gemfile.lock | 2 +- README.md | 4 ++-- src/bytes.rs | 14 +++++++------- src/cstr.rs | 14 +++++++------- src/lib.rs | 16 ++++------------ src/osstr.rs | 14 +++++++------- src/path.rs | 14 +++++++------- src/str.rs | 14 +++++++------- 11 files changed, 47 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a5edba36..90fa54f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -109,7 +109,7 @@ jobs: - name: Install Rust toolchain uses: artichoke/setup-rust/build-and-test@v1.12.1 with: - toolchain: "1.58.0" + toolchain: "1.76.0" - name: Compile run: cargo build --verbose diff --git a/.ruby-version b/.ruby-version index 619b5376..9c25013d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.3 +3.3.6 diff --git a/Cargo.toml b/Cargo.toml index 7ae49602..39fa6c07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "intaglio" -version = "1.9.1" # remember to set `html_root_url` in `src/lib.rs`. +version = "1.10.0" # remember to set `html_root_url` in `src/lib.rs`. authors = ["Ryan Lopopolo "] license = "MIT" edition = "2021" -rust-version = "1.58.0" +rust-version = "1.76.0" readme = "README.md" repository = "https://github.com/artichoke/intaglio" documentation = "https://docs.rs/intaglio" @@ -12,7 +12,7 @@ homepage = "https://github.com/artichoke/intaglio" description = "UTF-8 string and byte string interner and symbol table" keywords = ["bytestring", "intern", "interner", "symbol", "utf8"] categories = ["caching", "data-structures"] -include = ["src/**/*", "tests/**/*", "LICENSE", "README.md"] +include = ["/src/**/*", "/tests/**/*", "/LICENSE", "/README.md"] [features] # All features are enabled by default. diff --git a/Gemfile.lock b/Gemfile.lock index 29018c0b..04166782 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,4 +43,4 @@ DEPENDENCIES rubocop-rake (~> 0.6) BUNDLED WITH - 2.5.15 + 2.5.23 diff --git a/README.md b/README.md index 0a9d58f4..cee74189 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -intaglio = "1.9.1" +intaglio = "1.10.0" ``` Then intern UTF-8 strings like: @@ -136,7 +136,7 @@ All features are enabled by default. ### Minimum Supported Rust Version -This crate requires at least Rust 1.58.0. This version can be bumped in minor +This crate requires at least Rust 1.76.0. This version can be bumped in minor releases. ## License diff --git a/src/bytes.rs b/src/bytes.rs index 22bb6164..c1f75662 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -89,7 +89,7 @@ pub struct AllSymbols<'a> { phantom: PhantomData<&'a SymbolTable>, } -impl<'a> Iterator for AllSymbols<'a> { +impl Iterator for AllSymbols<'_> { type Item = Symbol; fn next(&mut self) -> Option { @@ -123,7 +123,7 @@ impl<'a> Iterator for AllSymbols<'a> { } } -impl<'a> DoubleEndedIterator for AllSymbols<'a> { +impl DoubleEndedIterator for AllSymbols<'_> { fn next_back(&mut self) -> Option { let next = self.range.next_back()?; debug_assert!(u32::try_from(next).is_ok()); @@ -137,7 +137,7 @@ impl<'a> DoubleEndedIterator for AllSymbols<'a> { } } -impl<'a> FusedIterator for AllSymbols<'a> {} +impl FusedIterator for AllSymbols<'_> {} /// An iterator over all interned byte strings in a [`SymbolTable`]. /// @@ -188,7 +188,7 @@ impl<'a> Iterator for Bytestrings<'a> { } } -impl<'a> DoubleEndedIterator for Bytestrings<'a> { +impl DoubleEndedIterator for Bytestrings<'_> { fn next_back(&mut self) -> Option { self.0.next_back().map(Interned::as_slice) } @@ -205,13 +205,13 @@ impl<'a> DoubleEndedIterator for Bytestrings<'a> { } } -impl<'a> ExactSizeIterator for Bytestrings<'a> { +impl ExactSizeIterator for Bytestrings<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> FusedIterator for Bytestrings<'a> {} +impl FusedIterator for Bytestrings<'_> {} /// An iterator over all symbols and interned byte strings in a [`SymbolTable`]. /// @@ -266,7 +266,7 @@ impl<'a> Iterator for Iter<'a> { } } -impl<'a> FusedIterator for Iter<'a> {} +impl FusedIterator for Iter<'_> {} impl<'a, S> IntoIterator for &'a SymbolTable { type Item = (Symbol, &'a [u8]); diff --git a/src/cstr.rs b/src/cstr.rs index ec9704b3..75d702b1 100644 --- a/src/cstr.rs +++ b/src/cstr.rs @@ -96,7 +96,7 @@ pub struct AllSymbols<'a> { phantom: PhantomData<&'a SymbolTable>, } -impl<'a> Iterator for AllSymbols<'a> { +impl Iterator for AllSymbols<'_> { type Item = Symbol; fn next(&mut self) -> Option { @@ -130,7 +130,7 @@ impl<'a> Iterator for AllSymbols<'a> { } } -impl<'a> DoubleEndedIterator for AllSymbols<'a> { +impl DoubleEndedIterator for AllSymbols<'_> { fn next_back(&mut self) -> Option { let next = self.range.next_back()?; debug_assert!(u32::try_from(next).is_ok()); @@ -144,7 +144,7 @@ impl<'a> DoubleEndedIterator for AllSymbols<'a> { } } -impl<'a> FusedIterator for AllSymbols<'a> {} +impl FusedIterator for AllSymbols<'_> {} /// An iterator over all interned C strings in a [`SymbolTable`]. /// @@ -196,7 +196,7 @@ impl<'a> Iterator for CStrings<'a> { } } -impl<'a> DoubleEndedIterator for CStrings<'a> { +impl DoubleEndedIterator for CStrings<'_> { fn next_back(&mut self) -> Option { self.0.next_back().map(Interned::as_slice) } @@ -213,13 +213,13 @@ impl<'a> DoubleEndedIterator for CStrings<'a> { } } -impl<'a> ExactSizeIterator for CStrings<'a> { +impl ExactSizeIterator for CStrings<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> FusedIterator for CStrings<'a> {} +impl FusedIterator for CStrings<'_> {} /// An iterator over all symbols and interned C strings in a [`SymbolTable`]. /// @@ -275,7 +275,7 @@ impl<'a> Iterator for Iter<'a> { } } -impl<'a> FusedIterator for Iter<'a> {} +impl FusedIterator for Iter<'_> {} impl<'a, S> IntoIterator for &'a SymbolTable { type Item = (Symbol, &'a CStr); diff --git a/src/lib.rs b/src/lib.rs index 8dfd7bff..d2465d78 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -109,7 +109,7 @@ //! [`&Path`]: std::path::Path //! [`&'static Path`]: std::path::Path -#![doc(html_root_url = "https://docs.rs/intaglio/1.9.1")] +#![doc(html_root_url = "https://docs.rs/intaglio/1.10.0")] use core::fmt; use core::num::TryFromIntError; @@ -271,7 +271,7 @@ impl Symbol { mod tests { use core::cmp::Ordering; use core::fmt::Write as _; - use core::hash::{BuildHasher as _, Hash as _, Hasher as _}; + use core::hash::BuildHasher as _; use core::marker::Unpin; use core::panic::{RefUnwindSafe, UnwindSafe}; use std::collections::hash_map::RandomState; @@ -346,16 +346,8 @@ mod tests { let new = SymbolOverflowError::new(); let s = RandomState::new(); - let default_hash = { - let mut hasher = s.build_hasher(); - default.hash(&mut hasher); - hasher.finish() - }; - let new_hash = { - let mut hasher = s.build_hasher(); - new.hash(&mut hasher); - hasher.finish() - }; + let default_hash = s.hash_one(default); + let new_hash = s.hash_one(new); assert_eq!(default_hash, new_hash); } diff --git a/src/osstr.rs b/src/osstr.rs index 7cd5cc35..a2f04eb8 100644 --- a/src/osstr.rs +++ b/src/osstr.rs @@ -96,7 +96,7 @@ pub struct AllSymbols<'a> { phantom: PhantomData<&'a SymbolTable>, } -impl<'a> Iterator for AllSymbols<'a> { +impl Iterator for AllSymbols<'_> { type Item = Symbol; fn next(&mut self) -> Option { @@ -130,7 +130,7 @@ impl<'a> Iterator for AllSymbols<'a> { } } -impl<'a> DoubleEndedIterator for AllSymbols<'a> { +impl DoubleEndedIterator for AllSymbols<'_> { fn next_back(&mut self) -> Option { let next = self.range.next_back()?; debug_assert!(u32::try_from(next).is_ok()); @@ -144,7 +144,7 @@ impl<'a> DoubleEndedIterator for AllSymbols<'a> { } } -impl<'a> FusedIterator for AllSymbols<'a> {} +impl FusedIterator for AllSymbols<'_> {} /// An iterator over all interned platform strings in a [`SymbolTable`]. /// @@ -196,7 +196,7 @@ impl<'a> Iterator for OsStrings<'a> { } } -impl<'a> DoubleEndedIterator for OsStrings<'a> { +impl DoubleEndedIterator for OsStrings<'_> { fn next_back(&mut self) -> Option { self.0.next_back().map(Interned::as_slice) } @@ -213,13 +213,13 @@ impl<'a> DoubleEndedIterator for OsStrings<'a> { } } -impl<'a> ExactSizeIterator for OsStrings<'a> { +impl ExactSizeIterator for OsStrings<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> FusedIterator for OsStrings<'a> {} +impl FusedIterator for OsStrings<'_> {} /// An iterator over all symbols and interned platform strings in a [`SymbolTable`]. /// @@ -275,7 +275,7 @@ impl<'a> Iterator for Iter<'a> { } } -impl<'a> FusedIterator for Iter<'a> {} +impl FusedIterator for Iter<'_> {} impl<'a, S> IntoIterator for &'a SymbolTable { type Item = (Symbol, &'a OsStr); diff --git a/src/path.rs b/src/path.rs index 9487a8a1..ab71baad 100644 --- a/src/path.rs +++ b/src/path.rs @@ -96,7 +96,7 @@ pub struct AllSymbols<'a> { phantom: PhantomData<&'a SymbolTable>, } -impl<'a> Iterator for AllSymbols<'a> { +impl Iterator for AllSymbols<'_> { type Item = Symbol; fn next(&mut self) -> Option { @@ -130,7 +130,7 @@ impl<'a> Iterator for AllSymbols<'a> { } } -impl<'a> DoubleEndedIterator for AllSymbols<'a> { +impl DoubleEndedIterator for AllSymbols<'_> { fn next_back(&mut self) -> Option { let next = self.range.next_back()?; debug_assert!(u32::try_from(next).is_ok()); @@ -144,7 +144,7 @@ impl<'a> DoubleEndedIterator for AllSymbols<'a> { } } -impl<'a> FusedIterator for AllSymbols<'a> {} +impl FusedIterator for AllSymbols<'_> {} /// An iterator over all interned path strings in a [`SymbolTable`]. /// @@ -196,7 +196,7 @@ impl<'a> Iterator for Paths<'a> { } } -impl<'a> DoubleEndedIterator for Paths<'a> { +impl DoubleEndedIterator for Paths<'_> { fn next_back(&mut self) -> Option { self.0.next_back().map(Interned::as_slice) } @@ -213,13 +213,13 @@ impl<'a> DoubleEndedIterator for Paths<'a> { } } -impl<'a> ExactSizeIterator for Paths<'a> { +impl ExactSizeIterator for Paths<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> FusedIterator for Paths<'a> {} +impl FusedIterator for Paths<'_> {} /// An iterator over all symbols and interned path strings in a [`SymbolTable`]. /// @@ -275,7 +275,7 @@ impl<'a> Iterator for Iter<'a> { } } -impl<'a> FusedIterator for Iter<'a> {} +impl FusedIterator for Iter<'_> {} impl<'a, S> IntoIterator for &'a SymbolTable { type Item = (Symbol, &'a Path); diff --git a/src/str.rs b/src/str.rs index 17ae598d..bf674bfc 100644 --- a/src/str.rs +++ b/src/str.rs @@ -38,7 +38,7 @@ pub struct AllSymbols<'a> { phantom: PhantomData<&'a SymbolTable>, } -impl<'a> Iterator for AllSymbols<'a> { +impl Iterator for AllSymbols<'_> { type Item = Symbol; fn next(&mut self) -> Option { @@ -72,7 +72,7 @@ impl<'a> Iterator for AllSymbols<'a> { } } -impl<'a> DoubleEndedIterator for AllSymbols<'a> { +impl DoubleEndedIterator for AllSymbols<'_> { fn next_back(&mut self) -> Option { let next = self.range.next_back()?; debug_assert!(u32::try_from(next).is_ok()); @@ -86,7 +86,7 @@ impl<'a> DoubleEndedIterator for AllSymbols<'a> { } } -impl<'a> FusedIterator for AllSymbols<'a> {} +impl FusedIterator for AllSymbols<'_> {} /// An iterator over all interned strings in a [`SymbolTable`]. /// @@ -136,7 +136,7 @@ impl<'a> Iterator for Strings<'a> { } } -impl<'a> DoubleEndedIterator for Strings<'a> { +impl DoubleEndedIterator for Strings<'_> { fn next_back(&mut self) -> Option { self.0.next_back().map(Interned::as_slice) } @@ -153,13 +153,13 @@ impl<'a> DoubleEndedIterator for Strings<'a> { } } -impl<'a> ExactSizeIterator for Strings<'a> { +impl ExactSizeIterator for Strings<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> FusedIterator for Strings<'a> {} +impl FusedIterator for Strings<'_> {} /// An iterator over all symbols and interned strings in a [`SymbolTable`]. /// @@ -212,7 +212,7 @@ impl<'a> Iterator for Iter<'a> { } } -impl<'a> FusedIterator for Iter<'a> {} +impl FusedIterator for Iter<'_> {} impl<'a, S> IntoIterator for &'a SymbolTable { type Item = (Symbol, &'a str);