Skip to content

Commit

Permalink
Merge pull request #423 from KodrAus/feat/value-bag
Browse files Browse the repository at this point in the history
Replace value internals with external crate
  • Loading branch information
KodrAus authored Nov 29, 2020
2 parents cb0b8c4 + 71d6ed3 commit 078e68f
Show file tree
Hide file tree
Showing 13 changed files with 669 additions and 1,904 deletions.
13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exclude = ["rfcs/**/*", "/.travis.yml", "/appveyor.yml"]
build = "build.rs"

[package.metadata.docs.rs]
features = ["std", "serde", "kv_unstable_sval"]
features = ["std", "serde", "kv_unstable_std", "kv_unstable_sval", "kv_unstable_serde"]

[[test]]
name = "filters"
Expand Down Expand Up @@ -45,14 +45,17 @@ std = []

# requires the latest stable
# this will have a tighter MSRV before stabilization
kv_unstable = []
kv_unstable_sval = ["kv_unstable", "sval/fmt"]
kv_unstable = ["value-bag"]
kv_unstable_sval = ["kv_unstable", "value-bag/sval", "sval"]
kv_unstable_std = ["std", "kv_unstable", "value-bag/error"]
kv_unstable_serde = ["kv_unstable_std", "value-bag/serde", "serde"]

[dependencies]
cfg-if = "1.0"
serde = { version = "1.0", optional = true, default-features = false }
sval = { version = "0.5.2", optional = true, default-features = false }
sval = { version = "1.0.0-alpha.4", optional = true, default-features = false }
value-bag = { version = "1.0.0-alpha.5", optional = true, default-features = false }

[dev-dependencies]
serde_test = "1.0"
sval = { version = "0.5.2", features = ["test"] }
value-bag = { version = "1.0.0-alpha.5", features = ["test"] }
9 changes: 0 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
use std::env;
use std::str;

#[cfg(feature = "kv_unstable")]
#[path = "src/kv/value/internal/cast/primitive.rs"]
mod primitive;

fn main() {
let target = match rustc_target() {
Some(target) => target,
Expand All @@ -22,11 +18,6 @@ fn main() {
println!("cargo:rustc-cfg=has_atomics");
}

// Generate sorted type id lookup
#[cfg(feature = "kv_unstable")]
primitive::generate();

println!("cargo:rustc-cfg=srcbuild");
println!("cargo:rerun-if-changed=build.rs");
}

Expand Down
4 changes: 2 additions & 2 deletions src/kv/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ mod std_support {
#[cfg(test)]
mod tests {
use super::*;
use kv::value::test::Token;
use kv::value::tests::Token;
use std::collections::{BTreeMap, HashMap};

#[test]
Expand Down Expand Up @@ -375,7 +375,7 @@ mod std_support {
#[cfg(test)]
mod tests {
use super::*;
use kv::value::test::Token;
use kv::value::tests::Token;

#[test]
fn source_is_object_safe() {
Expand Down
Loading

0 comments on commit 078e68f

Please sign in to comment.