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

chore: use clippy::use_self #4163

Merged
merged 1 commit into from
Jul 31, 2024
Merged

chore: use clippy::use_self #4163

merged 1 commit into from
Jul 31, 2024

Conversation

nkysg
Copy link
Collaborator

@nkysg nkysg commented Jul 30, 2024

https://rust-lang.github.io/rust-clippy/master/index.html#/use_self
cargo clippy --all-targets -- -Wclippy::use_self -D warnings

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

Copy link

coderabbitai bot commented Jul 30, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

164 files out of 217 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nkysg nkysg requested review from welbon, simonjiao and jackzhhuang and removed request for jolestar, LemonHX and yourmoonlight July 30, 2024 00:47
Copy link

Benchmark for 6d479dc

Click to view benchmark
Test Base PR %
accumulator_append 995.6±243.59µs 864.6±223.70µs -13.16%
block_apply/block_apply_10 376.9±12.03ms 400.6±20.07ms +6.29%
block_apply/block_apply_1000 43.4±2.14s 40.5±1.28s -6.68%
get_with_proof/db_store 48.4±5.57µs 46.7±2.60µs -3.51%
get_with_proof/mem_store 52.1±15.84µs 37.6±2.52µs -27.83%
put_and_commit/db_store/1 123.3±18.79µs 114.7±5.89µs -6.97%
put_and_commit/db_store/10 1476.5±334.40µs 1042.0±53.83µs -29.43%
put_and_commit/db_store/100 11.5±2.38ms 9.9±0.80ms -13.91%
put_and_commit/db_store/5 561.9±66.55µs 544.7±33.55µs -3.06%
put_and_commit/db_store/50 6.3±1.26ms 5.0±0.24ms -20.63%
put_and_commit/mem_store/1 75.7±10.52µs 72.3±7.62µs -4.49%
put_and_commit/mem_store/10 745.1±154.30µs 685.8±61.09µs -7.96%
put_and_commit/mem_store/100 8.0±1.72ms 7.7±1.92ms -3.75%
put_and_commit/mem_store/5 345.0±33.15µs 337.4±27.46µs -2.20%
put_and_commit/mem_store/50 4.0±1.04ms 3.3±0.14ms -17.50%
query_block/query_block_in(10)_times(100) 5.2±0.84ms 4.8±0.43ms -7.69%
query_block/query_block_in(10)_times(1000) 50.7±10.45ms 46.6±1.90ms -8.09%
query_block/query_block_in(10)_times(10000) 490.7±34.87ms 485.0±39.08ms -1.16%
query_block/query_block_in(1000)_times(100) 1645.8±453.60µs 1314.0±58.45µs -20.16%
query_block/query_block_in(1000)_times(1000) 14.3±1.94ms 13.6±2.63ms -4.90%
query_block/query_block_in(1000)_times(10000) 141.0±17.31ms 125.0±7.81ms -11.35%
storage_transaction 1152.4±446.10µs 1168.4±467.59µs +1.39%
vm/transaction_execution/1 435.3±18.92ms 477.1±48.35ms +9.60%
vm/transaction_execution/10 158.2±10.34ms 135.9±10.68ms -14.10%
vm/transaction_execution/20 147.6±20.82ms 124.2±4.57ms -15.85%
vm/transaction_execution/5 183.6±10.16ms 185.2±15.58ms +0.87%
vm/transaction_execution/50 158.6±16.77ms 145.3±9.00ms -8.39%

Copy link
Collaborator

@simonjiao simonjiao left a comment

Choose a reason for hiding this comment

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

LGTM

@nkysg nkysg merged commit ddaf1a3 into dag-master Jul 31, 2024
5 checks passed
@nkysg nkysg deleted the ysg/use_self branch July 31, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants