Skip to content
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

Rust 1.79 lints #5927

Merged
merged 8 commits into from
Jun 13, 2024
Merged

Rust 1.79 lints #5927

merged 8 commits into from
Jun 13, 2024

Conversation

realbigsean
Copy link
Member

Issue Addressed

fixing 1.79 lints including:

  • using u64::MAX instead of u64::max_value() or std::u64::MAX
  • some errors trigger a dead code lint when the field isn't read, but errors as fields are useful when printing via debug, so I just added #[allow(dead_code)] to these errors
  • removed spec: WatchSpec<E> from UpdateHandler as this was unused - wasn't sure if this field was intentionally there and should be kept?

@realbigsean realbigsean added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! labels Jun 13, 2024
@@ -47,7 +48,7 @@ pub struct UpdateHandler<E: EthSpec> {
pub blockprint: Option<WatchBlockprintClient>,
pub config: Config,
pub slots_per_epoch: u64,
pub spec: WatchSpec<E>,
pub _phantom: PhantomData<E>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this generic just be removed instead?

@@ -33,6 +33,7 @@ pub struct WatchBlockprint {
}

#[derive(Debug, QueryableByName, diesel::FromSqlRow)]
#[allow(dead_code)]
pub struct WatchValidatorBlockprint {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be deleted? i don't see it used but not sure if it's a useful export if anything depends on beacon watch?

@realbigsean
Copy link
Member Author

Also I need to cherry pick #5926 in to get CI to pass, so I'm going to close that PR

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Let's merge for now and we can cleanup beaconwatch later if we like

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jun 13, 2024
@michaelsproul
Copy link
Member

@Mergifyio queue

Copy link

mergify bot commented Jun 13, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at a740980

@mergify mergify bot merged commit a740980 into sigp:unstable Jun 13, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants