Skip to content

Fix or silence build warnings - #3

Merged
jackpot51 merged 3 commits into
masterfrom
build-warnings
Oct 14, 2021
Merged

jackpot51 merged 3 commits into
masterfrom
build-warnings

Conversation

@crawfxrd

Copy link
Copy Markdown
Member

Fix:

  • deprecated
  • clippy::clone_on_copy
  • clippy::if_then_panic
  • clippy::needless_borrow
  • clippy::println_empty_string
  • clippy::redundant_field_names

Silence:

  • dead_code
  • clippy::new_without_default
  • clippy::len_without_is_empty

@crawfxrd
crawfxrd requested review from a team October 14, 2021 13:28
@crawfxrd
crawfxrd force-pushed the build-warnings branch 2 times, most recently from 828e859 to c57768a Compare October 14, 2021 14:18
@crawfxrd

Copy link
Copy Markdown
Member Author

Should examples/flash.rs just be removed? It does the same thing as the main bin.

@jackpot51

Copy link
Copy Markdown
Member

@crawfxrd sure

The flash example does the same thing as the main binary.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Add license information to files. Done with:

    git ls-files src/ examples/ | xargs sed -i '1s,^,// SPDX-License-Identifier: MIT\n\n,'

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Fix:

- deprecated
- clippy::clone_on_copy
- clippy::if_then_panic
- clippy::needless_borrow
- clippy::println_empty_string
- clippy::redundant_field_names

Silence:

- dead_code
- clippy::new_without_default
- clippy::len_without_is_empty
- clippy::uninit_assumed_init

Signed-off-by: Tim Crawford <tcrawford@system76.com>

@jacobgkau jacobgkau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Builds & flashes (tested on galp5 UMA).

@jackpot51
jackpot51 merged commit 5345782 into master Oct 14, 2021
@jackpot51
jackpot51 deleted the build-warnings branch October 14, 2021 17:33
@crawfxrd crawfxrd mentioned this pull request Oct 26, 2021
28 tasks
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