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

use derive macro for Default trait on Scoreboard struct and chunk optimizations #207

Closed
wants to merge 8 commits into from

Conversation

suprohub
Copy link
Contributor

Description

A Detailed Description:
when I was reading the code I accidentally came across this:

impl Default for Scoreboard {
    fn default() -> Self {
        Self::new()
    }
}

In my opinion, this is a useless piece of code, because we can use #[derive(Default)] instead of this, for speed up
code read time.

Testing

cargo run and joining to server

Checklist

Things need to be done before this Pull Request can be merged.

  • [yes ] Code is well-formatted and adheres to project style guidelines: cargo fmt
  • [ yes] Code does not produce any clippy warnings cargo clippy

@Bryntet
Copy link
Contributor

Bryntet commented Oct 28, 2024

Change the commit name to something like "use derive macro for Default trait on Scoreboard"

@suprohub suprohub changed the title Use #[derive(Default) instead of impl Default use derive macro for Default trait on Scoreboard struct Oct 28, 2024
@suprohub suprohub changed the title use derive macro for Default trait on Scoreboard struct use derive macro for Default trait on Scoreboard struct Oct 28, 2024
@suprohub suprohub changed the title use derive macro for Default trait on Scoreboard struct use derive macro for Default trait on Scoreboard struct and chunk optimizations Oct 28, 2024
@Snowiiii
Copy link
Owner

  1. Use x instead of yes in checkboxes
  2. Don't lie to me, Your Code does produce clippy warns

@Snowiiii
Copy link
Owner

I also just noticed you not only added derive Default for Scoreboard, You added a bunch of things. This should be split up into multiple PR's

@suprohub
Copy link
Contributor Author

I also just noticed you not only added derive Default for Scoreboard, You added a bunch of things. This should be split up into multiple PR's

how i can create another pull request? i can only view current

@Snowiiii
Copy link
Owner

how i can create another pull request? i can only view current

You should use different branches

@suprohub suprohub closed this Oct 28, 2024
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.

3 participants