Skip to content

Commit

Permalink
chore: updates for Rust 1.72.0 (#459)
Browse files Browse the repository at this point in the history
Clippy was complaining about 3 new things in 1.72.0. Two new lints and
one updated one.

When `futures-core` was added as an explicit dependency on `console-api`
in #453, it was only added to the `console-api` Cargo.toml file. It
wasn't added to the Cargo.lock file shared by the workspace.

Since Rust 1.72.0, Cargo is adding this dependency to Cargo.lock
locally, so it makes sense to check in that change.
  • Loading branch information
hds authored Aug 24, 2023
1 parent 2ce3d81 commit f55821d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tokio-console/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl State {
mut self,
linters: impl IntoIterator<Item = Linter<Task>>,
) -> Self {
self.tasks_state.linters.extend(linters.into_iter());
self.tasks_state.linters.extend(linters);
self
}

Expand Down Expand Up @@ -505,7 +505,7 @@ fn truncate_registry_path(s: String) -> String {

static REGEX: OnceCell<Regex> = OnceCell::new();
let regex = REGEX.get_or_init(|| {
Regex::new(r#".*/\.cargo(/registry/src/[^/]*/|/git/checkouts/)"#)
Regex::new(r".*/\.cargo(/registry/src/[^/]*/|/git/checkouts/)")
.expect("failed to compile regex")
});

Expand Down
5 changes: 1 addition & 4 deletions tokio-console/src/state/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,7 @@ impl<T> fmt::Debug for Ids<T> {
impl<T> Clone for Id<T> {
#[inline]
fn clone(&self) -> Self {
Self {
id: self.id,
_ty: PhantomData,
}
*self
}
}

Expand Down

0 comments on commit f55821d

Please sign in to comment.