refactor: improve readability and consistency of Rust code#1850
Open
Lingxuan-Ye wants to merge 109 commits intokrahets:mainfrom
Open
refactor: improve readability and consistency of Rust code#1850Lingxuan-Ye wants to merge 109 commits intokrahets:mainfrom
Lingxuan-Ye wants to merge 109 commits intokrahets:mainfrom
Conversation
Author
|
Contributor
|
unwrap其实没什么,大量的加 pub 其实没必要,我觉得可以精炼一下,那些 print 主要是兼容其他语言,建议轻易不要动。否则,看几个 commit 就不想看了。 |
Author
|
First of all, these comments should not be doc comments because they do not document or explain any bit of the crates. Secondly, they should never be outer doc comments, as outer doc comments document items right below rather than the crates. It is just wrong.
Removed: - `clippy::let_and_return`
Removed: - `clippy::assign_op_pattern` - `clippy::let_and_return` Explicitly omitted: - `clippy::manual_swap`
Removed: - `clippy::needless_return` Explicitly omitted: - `dead_code` - `unused_variables`
When it comes to spatial overhead, `usize` should be used.
Explicitly omitted: - `clippy::manual_find` - `clippy::needless_range_loop`
Removed: - `clippy::let_and_return` Explicitly omitted: - `unused_variables` - `unused_assignments` - `clippy::needless_range_loop` - `clippy::manual_find`
Explicitly omitted: - `unused_variables` - `unused_assignments` - `clippy::needless_range_loop`
Removed: - `clippy::needless_return`
Explicitly omitted: - `clippy::vec_init_then_push`
Removed: - `clippy::needless_return` Explicitly omitted: - `clippy::new_without_default`
Explicitly omitted: - `clippy::new_without_default`
Removed: - `clippy::assign_op_pattern`
Removed: - `clippy::let_and_return`
Removed: - `clippy::needless_range_loop`
Removed: - `clippy::ptr_arg` - `clippy::assign_op_pattern` Explicitly omitted: - `clippy::needless_range_loop`
Refer to codes/rust/GUIDELINES.md for more information.
Removed: - `clippy::needless_return` - `clippy::self_assignment`
Author
|
重写了 git 历史以方便 review 并修改了部分不一致的代码。 |
Removed: - `clippy::needless_return` - `clippy::self_assignment`
…ypes with `Option<u32>`
Removed: - `clippy::self_assignment` - `clippy::assign_op_pattern`
…with `Option<u32>`
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 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.
If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:
If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist: