Skip to content

Conversation

martinfrances107
Copy link
Contributor

When I looked at the warning, I noted that everything could be auto derived.

warning: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> plotters-backend/src/text.rs:120:9
    |
120 | /         pub fn default() -> Self {
121 | |             Pos {
122 | |                 h_pos: HPos::Left,
123 | |                 v_pos: VPos::Top,
124 | |             }
125 | |         }
    | |_________^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `#[warn(clippy::should_implement_trait)]` on by default

…() method.

When I looked at the warning, I noted that everything could be auto derived.

```
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> plotters-backend/src/text.rs:120:9
    |
120 | /         pub fn default() -> Self {
121 | |             Pos {
122 | |                 h_pos: HPos::Left,
123 | |                 v_pos: VPos::Top,
124 | |             }
125 | |         }
    | |_________^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `#[warn(clippy::should_implement_trait)]` on by default
```
Copy link
Member

@AaronErhardt AaronErhardt left a comment

Choose a reason for hiding this comment

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

Thanks!

@AaronErhardt AaronErhardt merged commit 81d7ea7 into plotters-rs:master Oct 17, 2023
@martinfrances107 martinfrances107 deleted the default_fixup branch October 17, 2023 16:16
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