diff --git a/CHANGELOG.md b/CHANGELOG.md index cca4e8f..f37759a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 No unreleased changes yet! +## [0.8.4] - 2025-05-14 + +### Changed +- Bug fix: `impl AutoSerialize for Complex` now properly generates types `c8` and `c16` instead of `c4` and `c8`. Thanks @calder! +- Bug fix: The public dependency `zip` is now properly re-exported. +- Fixes some warnings generated by the `#[derive(...)]` macros in newer rust versions. + ## [0.8.3] - 2023-12-23 ### Added @@ -106,7 +113,8 @@ This is an extremely minor update that just updates the README. - Adds `NpyReader` for reading from an `io::Read` - Adds `Builder` and `NpyWriter` for writing to an `io::Write` -[Unreleased]: https://github.com/ExpHP/npyz/compare/0.8.3...HEAD +[Unreleased]: https://github.com/ExpHP/npyz/compare/0.8.4...HEAD +[0.8.4]: https://github.com/ExpHP/npyz/compare/0.8.3...0.8.4 [0.8.3]: https://github.com/ExpHP/npyz/compare/0.8.2...0.8.3 [0.8.2]: https://github.com/ExpHP/npyz/compare/0.8.1...0.8.2 [0.8.1]: https://github.com/ExpHP/npyz/compare/0.8.0...0.8.1 diff --git a/Cargo.toml b/Cargo.toml index a972f3f..286cd5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "npyz" -version = "0.8.3" +version = "0.8.4" edition = "2021" authors = [ "Michael Lamparski ", diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 68a0482..9e4ada8 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -238,7 +238,9 @@ fn gen_field_dtypes_struct( } } -// from the wonderful folks working on serde +// from the wonderful folks working on serde. +// By placing our generated impls inside a `const`, we can freely use `use` +// and `extern crate` without them leaking into the module. fn wrap_in_const( trait_: &str, ty: &syn::Ident, @@ -250,10 +252,13 @@ fn wrap_in_const( ); quote! { - #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] + #[allow(non_upper_case_globals)] + #[allow(unused_attributes)] + #[allow(unused_qualifications)] + #[allow(non_local_definitions)] // this warns on the impl-in-a-const technique, lol const #dummy_const: () = { #[allow(unknown_lints)] - #[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))] + #[allow(clippy::useless_attribute)] #[allow(rust_2018_idioms)] extern crate npyz as _npyz; diff --git a/src/lib.rs b/src/lib.rs index f057e3b..0e3e959 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -286,7 +286,7 @@ pub mod type_matchup_docs; pub use num_complex; #[cfg(feature = "arrayvec")] pub use arrayvec; -#[cfg(feature = "zip")] +#[cfg(feature = "npz")] pub use zip; #[cfg(feature = "half")] pub use half; diff --git a/src/serialize/mod.rs b/src/serialize/mod.rs index 1eb3490..5cfe95c 100644 --- a/src/serialize/mod.rs +++ b/src/serialize/mod.rs @@ -13,13 +13,11 @@ use traits::{helper, ErrorKind}; #[macro_use] mod traits; -pub use slice::*; +pub use slice::FixedSizeBytes; mod slice; -pub use primitive::*; mod primitive; -pub use array_member::*; mod array_member; // helpers