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

chore: add clippy::string_slice #1064

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

chore: add clippy::string_slice #1064

wants to merge 2 commits into from

Conversation

joshka
Copy link
Member

@joshka joshka commented Apr 25, 2024

Fixes: #1056

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.4%. Comparing base (97ee102) to head (d0245ab).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1064   +/-   ##
=====================================
  Coverage   89.4%   89.4%           
=====================================
  Files         61      61           
  Lines      15464   15468    +4     
=====================================
+ Hits       13833   13838    +5     
+ Misses      1631    1630    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Cargo.toml Outdated Show resolved Hide resolved
src/style/color.rs Outdated Show resolved Hide resolved
.ok_or(ParseColorError)?;
let blue = s
.get(5..7)
.and_then(|v| u8::from_str_radix(v, 16).ok())
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer non single letter variable names. Maybe str, maybe blue?

@joshka
Copy link
Member Author

joshka commented Apr 26, 2024

btw @EdJoPaTo I think you were right about that multiple dependencies lint.

❯ cargo tree -i windows-targets@0.48.5 --target all
windows-targets v0.48.5
├── parking_lot_core v0.9.9
│   └── parking_lot v0.12.1
│       └── crossterm v0.27.0
│           └── ratatui v0.26.2 (/Users/joshka/local/ratatui)
└── windows-sys v0.48.0
    └── mio v0.8.10
        ├── crossterm v0.27.0 (*)
        └── signal-hook-mio v0.2.3
            └── crossterm v0.27.0 (*)

❯ cargo tree -i windows-targets@0.52.5 --target all
windows-targets v0.52.5
└── windows-sys v0.52.0
    ├── console v0.15.8
    │   └── better-panic v0.3.0
    │       [dev-dependencies]
    │       └── ratatui v0.26.2 (/Users/joshka/local/ratatui)
    ├── is-terminal v0.4.12
    │   └── criterion v0.5.1
    │       [dev-dependencies]
    │       └── ratatui v0.26.2 (/Users/joshka/local/ratatui)
    └── winapi-util v0.1.8
        ├── same-file v1.0.6
        │   └── walkdir v2.5.0
        │       └── criterion v0.5.1 (*)
        └── walkdir v2.5.0 (*)

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.

Enable lint clippy::string_slice
2 participants