Skip to content

Commit

Permalink
fix: cleanup some unnecessary dependencies (#362)
Browse files Browse the repository at this point in the history
* fix: cleanup some unnecessary dependencies

* Remove macros feature, currently mandatory
  • Loading branch information
Nicceboy authored Oct 30, 2024
1 parent 18d6eed commit 59cb8ea
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 78 deletions.
84 changes: 17 additions & 67 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ chrono = { version = "0.4.38", default-features = false, features = ["alloc"] }
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] }

[features]
default = ["macros"]
macros = ["rasn-derive"]
std = []
backtraces = ["std", "snafu/backtrace"]
compiler = ["rasn-compiler"]
Expand Down Expand Up @@ -62,13 +60,11 @@ harness = false
test = true

[dependencies]
arrayvec = { version = "0.7.6", default-features = false }
bitvec.workspace = true
bytes = { version = "1.7.2", default-features = false }
chrono.workspace = true
either = { version = "1.13.0", default-features = false }
hashbrown = "0.14.5"
konst = { version = "0.3.9", default-features = false }
nom = { version = "7.1.3", default-features = false, features = ["alloc"] }
nom-bitvec = { package = "bitvec-nom2", version = "0.2.1" }
num-bigint = { version = "0.4.6", default-features = false }
Expand All @@ -81,7 +77,7 @@ once_cell = { version = "1.20.2", default-features = false, features = [
"alloc",
] }
rasn-compiler = { version = "0.5.3", optional = true }
rasn-derive = { version = "0.20", path = "macros", optional = true }
rasn-derive = { version = "0.20", path = "macros" }
snafu = { version = "0.8.5", default-features = false, features = [
"rust_1_81",
] }
Expand Down
1 change: 0 additions & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ proc-macro2 = "1.0.88"
itertools = "0.13"
uuid = { version = "1.11.0", default-features = false, features = ["v4"] }
either = { version = "1.13.0", default-features = false }
rayon = "1.10.0"
4 changes: 1 addition & 3 deletions macros/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,14 +1254,12 @@ impl StringValue {
values.push(StringRange::Range(start, end + is_inclusive as u32));
}
}

let into_flat_set = |constraints: Vec<_>| {
use rayon::prelude::*;
let mut set = constraints
.iter()
.flat_map(|from| match from {
StringRange::Single(value) => vec![*value],
StringRange::Range(start, end) => (*start..*end).into_par_iter().collect(),
StringRange::Range(start, end) => (*start..*end).collect::<Vec<u32>>(),
})
.collect::<Vec<u32>>();
set.sort();
Expand Down
4 changes: 2 additions & 2 deletions src/types/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl TagTree {
while inner_index < inner_tags.len() {
if Self::tree_contains(
&inner_tags[inner_index],
konst::slice::slice_from(nodes, index + 1),
nodes.split_at(index + 1).1,
) {
return false;
}
Expand All @@ -280,7 +280,7 @@ impl TagTree {
return true;
}

if Self::tag_contains(tag, konst::slice::slice_from(nodes, index + 1)) {
if Self::tag_contains(tag, nodes.split_at(index + 1).1) {
return false;
}
}
Expand Down

0 comments on commit 59cb8ea

Please sign in to comment.