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

minor improvements #152

Merged
merged 3 commits into from
Oct 8, 2019
Merged

minor improvements #152

merged 3 commits into from
Oct 8, 2019

Conversation

Luro02
Copy link
Contributor

@Luro02 Luro02 commented Oct 8, 2019

I fixed most clippy lints, except the ones from below:

    Checking derive_builder_core v0.8.0 (/media/hdd/home/projects/rust-derive-builder/derive_builder_core)
error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
  --> derive_builder_core/src/bindings.rs:12:22
   |
12 |     pub fn string_ty(&self) -> Path {
   |                      ^^^^^ help: consider passing by value instead: `self`
   |
note: lint level defined here
  --> derive_builder_core/src/lib.rs:25:9
   |
25 | #![deny(warnings, missing_docs)]
   |         ^^^^^^^^
   = note: `#[deny(clippy::trivially_copy_pass_by_ref)]` implied by `#[deny(warnings)]`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:22:22
  |
22|     pub fn result_ty(&self) -> Path {
  |                      ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:32:22
  |
32|     pub fn option_ty(&self) -> Path {
  |                      ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:42:28
  |
42|     pub fn phantom_data_ty(&self) -> Path {
  |                            ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:52:26
  |
52|     pub fn default_trait(&self) -> Path {
  |                          ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:62:24
  |
62|     pub fn clone_trait(&self) -> Path {
  |                        ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:73:23
  |
73|     pub fn into_trait(&self) -> Path {
  |                       ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/bindings.rs:83:27
  |
83|     pub fn try_into_trait(&self) -> Path {
  |                           ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
 --> derive_builder_core/src/options.rs:25:27
  |
25|     pub fn requires_clone(&self) -> bool {
  |                           ^^^^^ help: consider passing by value instead: `self`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref

error: aborting due to 9 previous errors

error: could not compile `derive_builder_core`.

To learn more, run the command again with --verbose.

Copy link
Collaborator

@TedDriggs TedDriggs left a comment

Choose a reason for hiding this comment

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

Thank you!

@TedDriggs TedDriggs merged commit 39295e9 into colin-kiegel:master Oct 8, 2019
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.

None yet

2 participants