diff --git a/Cargo.toml b/Cargo.toml index 787b54c..26d2944 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,5 +34,15 @@ num-traits = { version = "0.2", optional = true } serde = { version = "1", optional = true } serde_derive = { version = "1", optional = true } +[dev-dependencies] +serde_json = "1" + [package.metadata.docs.rs] all-features = true + +[[example]] +name = "hello-world" + +[[example]] +name = "serialization" +required-features = ["serialization"] diff --git a/examples/01-hello-world/Cargo.toml b/examples/01-hello-world/Cargo.toml deleted file mode 100644 index 7dc3fa2..0000000 --- a/examples/01-hello-world/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "hello-world" -version = "0.2.0" -authors = ["Dimitri Sabadie "] - -[dependencies] -splines = "1.0.0-rc.2" diff --git a/examples/02-serialization/Cargo.toml b/examples/02-serialization/Cargo.toml deleted file mode 100644 index 5aad2fd..0000000 --- a/examples/02-serialization/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "serialization" -version = "0.2.0" -authors = ["Dimitri Sabadie "] - -[dependencies] -serde_json = "1" -splines = { version = "1.0.0-rc.2", features = ["serialization"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml deleted file mode 100644 index 62a55c0..0000000 --- a/examples/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[workspace] - -members = [ - "01-hello-world", - "02-serialization" -] - -[patch.crates-io] -splines = { path = ".." } diff --git a/examples/01-hello-world/src/main.rs b/examples/hello-world.rs similarity index 100% rename from examples/01-hello-world/src/main.rs rename to examples/hello-world.rs diff --git a/examples/02-serialization/src/main.rs b/examples/serialization.rs similarity index 100% rename from examples/02-serialization/src/main.rs rename to examples/serialization.rs diff --git a/tests/mod.rs b/tests/mod.rs index 91007a6..ab98ebb 100644 --- a/tests/mod.rs +++ b/tests/mod.rs @@ -1,7 +1,7 @@ use splines::{Interpolation, Key, Spline}; -#[cfg(feature = "impl-cgmath")] use cgmath as cg; -#[cfg(feature = "impl-nalgebra")] use nalgebra as na; +#[cfg(feature = "cgmath")] use cgmath as cg; +#[cfg(feature = "nalgebra")] use nalgebra as na; #[test] fn step_interpolation_f32() { @@ -149,7 +149,7 @@ fn several_interpolations_several_keys() { assert_eq!(spline.clamped_sample(11.), Some(4.)); } -#[cfg(feature = "impl-cgmath")] +#[cfg(feature = "cgmath")] #[test] fn cgmath_vector_interpolation() { use splines::Interpolate; @@ -163,7 +163,7 @@ fn cgmath_vector_interpolation() { assert_eq!(Interpolate::lerp(start, end, 0.5), mid); } -#[cfg(feature = "impl-nalgebra")] +#[cfg(feature = "nalgebra")] #[test] fn nalgebra_vector_interpolation() { use splines::Interpolate;