This repository was archived by the owner on Jul 28, 2025. It is now read-only.
Clean up some clippy warnings#277
Merged
lann merged 2 commits intobytecodealliance:mainfrom May 10, 2024
Merged
Conversation
There is one "real" change here which is that the visit_byte_buf method was previously dead code because the "alloc" feature was not defined (and the crate depends unconditionally on std). Instead of deleting the method I removed the conditional so that the method will be included.
lann
reviewed
May 10, 2024
| let mut record: operator::OperatorRecord = e_data.contents.try_into().unwrap(); | ||
|
|
||
| record.prev = last.clone(); | ||
| record.prev.clone_from(last); |
Collaborator
There was a problem hiding this comment.
I was surprised that clippy would recommend a readability regression like this and it looks like I am not alone: rust-lang/rust-clippy#12778
Contributor
Author
There was a problem hiding this comment.
Want to disable the lint rather than make this change?
Collaborator
There was a problem hiding this comment.
eh, given its just in tests its probably fine to leave this PR as-is.
|
|
||
| #[derive(Queryable)] | ||
| #[diesel(table_name = checkpoints)] | ||
| #[allow(dead_code)] |
Collaborator
There was a problem hiding this comment.
What was marked dead here? I'm surprised anything in a #[derive(Queryable)] would be...
Contributor
Author
There was a problem hiding this comment.
The timestamp fields. The query fills them in, but nothing reads them.
Collaborator
There was a problem hiding this comment.
Ah yeah I guess Queryable would be read-only wouldn't it? 👍
lann
approved these changes
May 10, 2024
Collaborator
|
Thanks! |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Remove some unused imports, use
clone_fromwhere appropriate, allow unread fields on a Postgres-related structure, and fix a#[cfg(feature = ...)]referencing a non-existent feature.