-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(subscriber): remove unused AggregatorHandle
and fix other lints
#578
Merged
+12
−40
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A number of new or updated Clippy lints in Rust 1.80.0 need to be fixed. An update to the `dead_code` pointed out that the `AggregatorHandle` is not used, and it is not constructable from outside the crate because it has a private field. This struct was introduced in #451 as part of the `Server::into_parts` method. Originally, this method was going to return the `AggregatorHandle`, which wrapped the join handle from the task where the `Aggregator` had been spawned. This was later replaced by returning the `Aggregator` itself, which the user had the obligation to spawn themselves. However, it seems that the `AggregatorHandle` wasn't removed, even though it was never used. A new lint is the one for unexpected `--cfg` items. We now need to declare those in `Cargo.toml`. An update to `needless_borrows_for_generic_args` causes a false positive changing a `&mut` to a move, which we can't do as the same value is used afterwards.
hds
force-pushed
the
hds/clippy-rust-1-80-0
branch
from
July 29, 2024 07:51
7b9c543
to
864a481
Compare
@hi-rustin Could you please have a look at these changes to fix new and updated clippy lints form Rust 1.80.0. |
Rustin170506
approved these changes
Jul 29, 2024
Merged
hds
pushed a commit
that referenced
this pull request
Jul 29, 2024
…onsole-v0.1.12 ## 🤖 New release * `tokio-console`: 0.1.11 -> 0.1.12 * `console-api`: 0.7.0 -> 0.8.0 * `console-subscriber`: 0.3.0 -> 0.4.0 ## `tokio-console` ## 0.2.0 - (2024-07-29) ### Fixed - Handle Windows path correctly ([#555](#555)) ([6ad0def](6ad0def)) - Avoid crash when accessing selected item ([#570](#570)) ([9205e15](9205e15)) ### Updated - Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-api` ## 0.8.0 - (2024-07-29) ### <a id = "0.8.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Updated - [**breaking**](#0.8.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-subscriber` ## 0.4.0 - (2024-07-29) ### <a id = "0.4.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Added - Add `TOKIO_CONSOLE_BUFFER_CAPACITY` env variable ([#568](#568)) ([a6cf14b](a6cf14b)) ### Fixed - Remove unused `AggregatorHandle` and fix other lints ([#578](#578)) ([c442063](c442063)) ### Updated - [**breaking**](#0.4.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2))
hds
pushed a commit
that referenced
this pull request
Jul 29, 2024
…onsole-v0.1.12 ## 🤖 New release * `tokio-console`: 0.1.11 -> 0.1.12 * `console-api`: 0.7.0 -> 0.8.0 * `console-subscriber`: 0.3.0 -> 0.4.0 ## `tokio-console` ## 0.1.12 - (2024-07-29) ### Fixed - Handle Windows path correctly ([#555](#555)) ([6ad0def](6ad0def)) - Avoid crash when accessing selected item ([#570](#570)) ([9205e15](9205e15)) ### Updated - Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-api` ## 0.8.0 - (2024-07-29) ### <a id = "0.8.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Updated - [**breaking**](#0.8.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-subscriber` ## 0.4.0 - (2024-07-29) ### <a id = "0.4.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Added - Add `TOKIO_CONSOLE_BUFFER_CAPACITY` env variable ([#568](#568)) ([a6cf14b](a6cf14b)) ### Fixed - Remove unused `AggregatorHandle` and fix other lints ([#578](#578)) ([c442063](c442063)) ### Updated - [**breaking**](#0.4.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2))
hds
pushed a commit
that referenced
this pull request
Jul 29, 2024
…onsole-v0.1.12 ## 🤖 New release * `tokio-console`: 0.1.11 -> 0.1.12 * `console-api`: 0.7.0 -> 0.8.0 * `console-subscriber`: 0.3.0 -> 0.4.0 ## `tokio-console` ## 0.1.12 - (2024-07-29) ### Fixed - Handle Windows path correctly ([#555](#555)) ([6ad0def](6ad0def)) - Avoid crash when accessing selected item ([#570](#570)) ([9205e15](9205e15)) ### Updated - Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-api` ## 0.8.0 - (2024-07-29) ### <a id = "0.8.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Updated - [**breaking**](#0.8.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-subscriber` ## 0.4.0 - (2024-07-29) ### <a id = "0.4.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](https://github.com/tokio-rs/console/commit/5f6faa22d944735c2b8c312cac03b35a4ab228ef))<br />This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Added - Add `TOKIO_CONSOLE_BUFFER_CAPACITY` env variable ([#568](#568)) ([a6cf14b](a6cf14b)) ### Fixed - Remove unused `AggregatorHandle` and fix other lints ([#578](#578)) ([c442063](c442063)) ### Updated - [**breaking**](#0.4.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2))
hds
pushed a commit
that referenced
this pull request
Jul 29, 2024
…onsole-v0.1.12 ## 🤖 New release * `tokio-console`: 0.1.11 -> 0.1.12 * `console-api`: 0.7.0 -> 0.8.0 * `console-subscriber`: 0.3.0 -> 0.4.0 ## `tokio-console` ## 0.1.12 - (2024-07-29) ### Fixed - Handle Windows path correctly ([#555](#555)) ([6ad0def](6ad0def)) - Avoid crash when accessing selected item ([#570](#570)) ([9205e15](9205e15)) ### Updated - Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-api` ## 0.8.0 - (2024-07-29) ### <a id = "0.8.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](5f6faa2)) This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Updated - [**breaking**](#0.8.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-subscriber` ## 0.4.0 - (2024-07-29) ### <a id = "0.4.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](5f6faa2)) This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Added - Add `TOKIO_CONSOLE_BUFFER_CAPACITY` env variable ([#568](#568)) ([a6cf14b](a6cf14b)) ### Fixed - Remove unused `AggregatorHandle` and fix other lints ([#578](#578)) ([c442063](c442063)) ### Updated - [**breaking**](#0.4.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2))
hds
pushed a commit
that referenced
this pull request
Jul 29, 2024
…onsole-v0.1.12 (#576) ## 🤖 New release * `tokio-console`: 0.1.11 -> 0.1.12 * `console-api`: 0.7.0 -> 0.8.0 * `console-subscriber`: 0.3.0 -> 0.4.0 ## `tokio-console` ## 0.1.12 - (2024-07-29) ### Fixed - Handle Windows path correctly ([#555](#555)) ([6ad0def](6ad0def)) - Avoid crash when accessing selected item ([#570](#570)) ([9205e15](9205e15)) ### Updated - Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-api` ## 0.8.0 - (2024-07-29) ### <a id = "0.8.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](5f6faa2)) This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Updated - [**breaking**](#0.8.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) ## `console-subscriber` ## 0.4.0 - (2024-07-29) ### <a id = "0.4.0-breaking"></a>Breaking Changes - **Upgrade tonic to 0.12 ([#571](#571 ([5f6faa2](5f6faa2)) This is a breaking change for users of `console-api` and `console-subscriber`, as it changes the public `tonic`, `prost` and `prost-types` dependency to a semver-incompatible version. This breaks compatibility with `tonic` 0.11.x as well as `prost`/`prost-types` 0.12.x. ### Added - Add `TOKIO_CONSOLE_BUFFER_CAPACITY` env variable ([#568](#568)) ([a6cf14b](a6cf14b)) ### Fixed - Remove unused `AggregatorHandle` and fix other lints ([#578](#578)) ([c442063](c442063)) ### Updated - [**breaking**](#0.4.0-breaking) Upgrade tonic to 0.12 ([#571](#571)) ([5f6faa2](5f6faa2)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A number of new or updated Clippy lints in Rust 1.80.0 need to be fixed.
An update to the
dead_code
pointed out that theAggregatorHandle
isnot used, and it is not constructable from outside the crate because it
has a private field. This struct was introduced in #451 as part of the
Server::into_parts
method. Originally, this method was going to returnthe
AggregatorHandle
, which wrapped the join handle from the taskwhere the
Aggregator
had been spawned. This was later replaced byreturning the
Aggregator
itself, which the user had the obligation tospawn themselves. However, it seems that the
AggregatorHandle
wasn'tremoved, even though it was never used.
A new lint is the one for unexpected
--cfg
items. We now need todeclare those in
Cargo.toml
.An update to
needless_borrows_for_generic_args
causes a false positivechanging a
&mut
to a move, which we can't do as the same value is usedafterwards.