color_space icon indicating copy to clipboard operation
color_space copied to clipboard

Reformat code, deny unsafe and fix clippy errors

Open Aloso opened this issue 4 years ago • 3 comments

This PR

  • Reformats everything with cargo fmt. This is generally recommended in open-source projects, as it enforces a consistent style. Also, rust-analyzer runs cargo fmt by default every time a file is saved, so having to disable it for this repository is inconvenient.

    Note that a few parts of the code are less readable than before, but I think the gained consistency is worth it. It might be possible to improve readability by extracting expressions into new variables.

  • Disables some clippy lints, so cargo clippy produces no warnings or errors.

  • Adds #[deny(unsafe_code)], since this crate doesn't require unsafe.

Aloso avatar Oct 31 '20 19:10 Aloso

will merge this soon, probably. just need to find time to look it over and also learn about whatever clippy is lol

ChevyRay avatar Nov 02 '20 02:11 ChevyRay

@ChevyRay any progress?

(clippy is a linter that detects common mistakes, see https://rust-lang.github.io/rust-clippy/stable/index.html)

Aloso avatar Nov 09 '20 11:11 Aloso

like i said, when i find time to look it over and learn about what clippy is

ChevyRay avatar Nov 09 '20 22:11 ChevyRay