Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix broken build due to stdsimd feature being removed from nightly #142

Merged
merged 5 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 5 additions & 4 deletions src/fixed/kdtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down
9 changes: 5 additions & 4 deletions src/float/kdtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -84,15 +82,18 @@ pub struct StemNode<A: Copy + Default, const K: usize, IDX> {
)]
#[derive(Clone, Debug, PartialEq)]
pub struct LeafNode<A: Copy + Default, T: Copy + Default, const K: usize, 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(serialize = "A: Serialize", deserialize = "A: Deserialize<'de>"))
)]
// TODO: Refactor content_points to be [[A; B]; K] to see if this helps vectorisation
pub 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(
Expand Down
9 changes: 5 additions & 4 deletions src/float_leaf_simd/leaf_node.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(feature = "serialize")]
use crate::custom_serde::*;
use az::Cast;
#[cfg(feature = "serialize")]
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -32,14 +30,17 @@ use crate::{float::kdtree::Axis, types::Content};
)]
#[derive(Clone, Debug, PartialEq)]
pub struct LeafNode<A: Copy + Default, T: Copy + Default, const K: usize, const B: usize> {
#[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(
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
Loading