diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08a8169e..0cea2dbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} options: --features=serialize,serialize_rkyv --no-deps + name: Clippy (stable) - name: Check Rustdoc Links run: RUSTDOCFLAGS="--deny broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items @@ -105,6 +106,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} options: --all-features --no-deps + name: Clippy (nightly) - name: Check Rustdoc Links run: RUSTDOCFLAGS="--deny broken_intra_doc_links" cargo doc --verbose --workspace --no-deps --document-private-items diff --git a/Cargo.toml b/Cargo.toml index b9fe8893..87550e31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,11 +85,12 @@ default-features = false features = ["alloc", "copy_unsafe", "size_64"] [features] -serialize = ["serde", "serde_derive", "serde_with", "fixed/serde"] +global_allocate = [] +immutable = [] +serialize = ["serde", "serde/derive", "serde_derive", "serde_with", "fixed/serde"] serialize_rkyv = ["rkyv"] simd = [] tracing = ["dep:tracing", "tracing-subscriber"] -immutable = [] default = ["tracing"] [package.metadata.docs.rs] diff --git a/src/fixed/kdtree.rs b/src/fixed/kdtree.rs index 9a7f6b48..18046787 100644 --- a/src/fixed/kdtree.rs +++ b/src/fixed/kdtree.rs @@ -9,8 +9,6 @@ use fixed::traits::Fixed; use std::cmp::PartialEq; use std::fmt::Debug; -#[cfg(feature = "serialize")] -use crate::custom_serde::*; use crate::types::{Content, Index}; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; @@ -124,7 +122,10 @@ pub(crate) struct LeafNode< const B: usize, IDX, > { - #[cfg_attr(feature = "serialize", serde(with = "array_of_arrays"))] + #[cfg_attr( + feature = "serialize", + serde(with = "crate::custom_serde::array_of_arrays") + )] #[cfg_attr( feature = "serialize", serde(bound( @@ -135,7 +136,7 @@ pub(crate) struct LeafNode< // TODO: Refactor content_points to be [[A; B]; K] to see if this helps vectorisation pub(crate) content_points: [[A; K]; B], - #[cfg_attr(feature = "serialize", serde(with = "array"))] + #[cfg_attr(feature = "serialize", serde(with = "crate::custom_serde::array"))] #[cfg_attr( feature = "serialize", serde(bound( diff --git a/src/float/kdtree.rs b/src/float/kdtree.rs index d27478f3..cfb6f11e 100644 --- a/src/float/kdtree.rs +++ b/src/float/kdtree.rs @@ -7,8 +7,6 @@ use num_traits::float::FloatCore; use std::cmp::PartialEq; use std::fmt::Debug; -#[cfg(feature = "serialize")] -use crate::custom_serde::*; use crate::types::{Content, Index}; #[cfg(feature = "serialize")] use serde::{Deserialize, Serialize}; @@ -84,7 +82,10 @@ pub struct StemNode { )] #[derive(Clone, Debug, PartialEq)] pub struct LeafNode { - #[cfg_attr(feature = "serialize", serde(with = "array_of_arrays"))] + #[cfg_attr( + feature = "serialize", + serde(with = "crate::custom_serde::array_of_arrays") + )] #[cfg_attr( feature = "serialize", serde(bound(serialize = "A: Serialize", deserialize = "A: Deserialize<'de>")) @@ -92,7 +93,7 @@ pub struct LeafNode { - #[cfg_attr(feature = "serialize", serde(with = "array_of_arrays"))] + #[cfg_attr( + feature = "serialize", + serde(with = "crate::custom_serde::array_of_arrays") + )] #[cfg_attr( feature = "serialize", serde(bound(serialize = "A: Serialize", deserialize = "A: Deserialize<'de>")) )] pub content_points: [[A; B]; K], - #[cfg_attr(feature = "serialize", serde(with = "array"))] + #[cfg_attr(feature = "serialize", serde(with = "crate::custom_serde::array"))] #[cfg_attr( feature = "serialize", serde(bound( diff --git a/src/lib.rs b/src/lib.rs index 524d7146..6fc8ef18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![cfg_attr(feature = "simd", feature(stdsimd))] #![cfg_attr(feature = "simd", feature(slice_as_chunks))] #![cfg_attr(feature = "global_allocate", feature(allocator_api))] #![warn(rustdoc::missing_crate_level_docs)]