Skip to content

fix: Build warnings#50

Open
brian6932 wants to merge 1 commit intoBeastwick18:mainfrom
brian6932:fix/build-warnings
Open

fix: Build warnings#50
brian6932 wants to merge 1 commit intoBeastwick18:mainfrom
brian6932:fix/build-warnings

Conversation

@brian6932
Copy link
Copy Markdown

Gets rid of these:

warning: unnecessary parentheses around closure body
  --> src\results.rs:87:54
   |
87 | ...                   .map(|(pos, ch)| (pos..pos + ch.len_utf8()))
   |                                        ^                        ^
   |
   = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
   |
87 -                                     .map(|(pos, ch)| (pos..pos + ch.len_utf8()))
87 +                                     .map(|(pos, ch)| pos..pos + ch.len_utf8() )
   |

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src\widget.rs:143:28
    |
143 | pub fn border_block(theme: &Theme, focused: bool) -> Block {
    |                            ^^^^^^                    ^^^^^ the same lifetime is hidden here
    |                            |
    |                            the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
143 | pub fn border_block(theme: &Theme, focused: bool) -> Block<'_> {
    |                                                           ++++

warning: `nyaa` (lib) generated 2 warnings (run `cargo fix --lib -p nyaa` to apply 2 suggestions)
warning: `nyaa` (bin "nyaa") generated 2 warnings (2 duplicates)

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.

1 participant