2 releases

0.1.1 Dec 8, 2023
0.1.0 Nov 6, 2023

#697 in Development tools

Download history 103/week @ 2024-03-11 90/week @ 2024-03-18 156/week @ 2024-03-25 217/week @ 2024-04-01 157/week @ 2024-04-08 64/week @ 2024-04-15 83/week @ 2024-04-22 114/week @ 2024-04-29 250/week @ 2024-05-06 87/week @ 2024-05-13 66/week @ 2024-05-20 43/week @ 2024-05-27 63/week @ 2024-06-03 38/week @ 2024-06-10 277/week @ 2024-06-17 46/week @ 2024-06-24

430 downloads per month
Used in 6 crates (5 directly)

MIT/Apache

11KB
160 lines

intentional

A crate for intentionally performing "questionable" operations.

Why?

Clippy is an amazing tool, so much so that this crate's creator uses #[warn(clippy::pedantic)] on nearly all of his projects. There are a few lints that are enabled by Pedantic that in some situations have no way to work around except to use the operation being warned against.

This crate provides APIs that are ways to perform the warned operations explicitly. Take for example converting an f32 to a u32. This triggers two lints enabled in pedantic:

The problem with converting between f32 and u32 is that there is no way to disable these lints on a per-expression basis, which leads to disabling the warning across a wider range of code than necessary. This may lead to future bugs when code is refactored and the as usage is no longer correct.

This crate attempts to offer ways for the developer to be explicit about their intentions and minimize the number of disabled clippy lints.

No runtime deps