enable and fix stricter clippy linting

- add clippy to .build.yml to run on sr.ht
- add missing docs
- use core:: instead of std:: where possible
- use hypot() and mul_add() for better numeric stability
- make all float tests use asser_approx_eq() and explicitly check for NaN/Inf
- add missing semicolons here and there
- add #[must_use] to ensure caller uses returned value
- add const fn where appropriate
- change visibility from pub(crate) to pub (in private modules)

Signed-off-by: Stephen Waits <steve@waits.net>
This commit is contained in:
swaits committed 2023-02-09 10:54:42 -07:00
1 parent c3b3ff1e4d
commit cdab359b4e
6 files changed
+106 -63

No files matched your search

+4 -2
View File
@@ -11,13 +11,15 @@ tasks:
- stable: |
rustup default stable
cd vivaldi-nc/
cargo clippy --verbose
cargo build --verbose
cargo test --verbose
- nightly: |
rustup default nightly
cd vivaldi-nc/
cargo build --verbose ||:
cargo test --verbose ||:
cargo clippy --verbose ||:
cargo build --verbose ||:
cargo test --verbose ||:
- docs: |
cd vivaldi-nc/
rustup run stable cargo doc --no-deps