capstan
capstan copied to clipboard
Rust 2021, `clippy` clean, `rustfmt` etc.
- Updated to Rust 2021.
- Bumped all deps to latest versions.
- Made the crate build with stable Rust using the
is_sortedcrate. When using theunstablefeature theis_sortedcrate falls back to using the unstableis_sortedfeature. I.e. the crate will then only compile withnightly. - Made this a library-only crate. I.e. removed
Cargo.lockfrom git and movedsrc/main.rstoexamples/diagram.rs. - Moved everything the crate exports one level up to the root so there is less typing for users.
TODO:
- Swap deprecated
nalgebra::VectorNfor one of the alternatives.
no_std
I removed the crate's std depedency as much as possible using resp. traits from core instead (and using thiserror-no-std).
To make this crate truly no_std (i.e. particualrly not require allocations) consider abandoning the OOP approach where a Curve is a struct.
Instead go for one where there are only the functions like de_boor() etc. that take all the required curve data as slices instead of Vec.
Curve::new() would be renamed to is_curve_ok().
See e.g. my uniform-cubic-splines crate (which is no_std) for this approach.