summaryrefslogtreecommitdiffstats
path: root/.cargo
AgeCommit message (Collapse)Author
2023-12-05Remove -Dwarnings from cargo configuration.Justus Winter
- Denying all warnings means turning deprecation warnings into hard errors, which turns semver-compatible updates of our dependencies into compilation breaking updates if some functionality we use is deprecated. This defeats the sole purpose of deprecating APIs. - See https://gitlab.com/sequoia-pgp/sequoia/-/issues/827
2023-09-15clippy: Fail only on correctness and suspicious lints.Wiktor Kwapisiewicz
- See https://gitlab.com/sequoia-pgp/sequoia/-/issues/1038#note_1555082822
2023-05-12autocrypt: Refactor to avoid unnecessary unwraps and panics.Neal H. Walfield
- The sole caller of `decode_autocrypt_like_header` already has the data in the form that `decode_autocrypt_like_header` wants. Pass it as is. This avoids double parsing and, since we now use the expected types, `unwrap`s and a `panic`.
2022-10-07Disable clippy lint unnecessary_lazy_evaluations.Heiko Schaefer
Resolves #935 (in which Neal argues: "the programmer always has to use a performance heuristic to determine whether to use unwrap_or or unwrap_or_else. The heuristic should be as simple as possible to reduce the programmer's cognitive burden and allow them to concentrate on the task at hand. A simple heuristic is: if the value is a literal, use unwrap_or otherwise use unwrap_or_else. This is reasonable given that the cost of using .unwrap_or_else(|| literal) instead of .unwrap_or(literal) is effectively zero; it is never wrong from a performance perspective to use unwrap_or_else instead of unwrap_or, but it can be wrong to use unwrap_or instead of unwrap_or_else.")
2022-01-12Disable a number of clippy's lints.Neal H. Walfield
- clippy::collapsible-else-if: Warns about: if x { if y { } else { } } else { if y { } else { } } But, this can express the intent of the code better than the version that clippy prefers: if x { if y { } else { } } else if y { } else { } - clippy::needless-question-mark, clippy::try-err: While clippy is right that the ? could sometimes be replaced with a return, using a ? also does a conversion (`From`). So to allow global consistency, permit this construct. - clippy::redundant-clone: Clippy warns that the last use of a variable doesn't have to be cloned. This is true, but can make use of a variable in a function inconsistent. Also, if an additional case that uses the variable is added later, a `.clone()` may have to be added anyway.
2022-01-12ci: Set flags in .cargo/config.toml, not in .gitlab-ci.yml.Neal H. Walfield
- Setting complication flags in .gitlab-ci.yml means that they will only be used by the CI. - Instead, set flags in .cargo/config.toml so that compiling locally will use the same set of lints.