Skip to content

Commit

Permalink
Remove enumset optional dependency
Browse files Browse the repository at this point in the history
The `JsonSchema` impl for enumset does not accurately represent how it is de/serialized by default
  • Loading branch information
GREsau committed Sep 9, 2024
1 parent 6a03758 commit 38a67a1
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 98 deletions.
68 changes: 0 additions & 68 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ Schemars can implement `JsonSchema` on types from several popular crates, enable
- `bytes1` - [bytes](https://crates.io/crates/bytes) (^1.0)
- `chrono04` - [chrono](https://crates.io/crates/chrono) (^0.4)
- `either1` - [either](https://crates.io/crates/either) (^1.3)
- `enumset1` - [enumset](https://crates.io/crates/enumset) (^1.0)
- `indexmap2` - [indexmap](https://crates.io/crates/indexmap) (^2.0)
- `rust_decimal1` - [rust_decimal](https://crates.io/crates/rust_decimal) (^1.0)
- `semver1` - [semver](https://crates.io/crates/semver) (^1.0.9)
Expand Down
3 changes: 1 addition & 2 deletions docs/0-migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ All optional dependencies are now suffixed by their version:
- `url` is now `url2`
- `bytes` is now `bytes1`
- `rust_decimal` is now `rust_decimal1`
- `enumset` is now `enumset1`
- `smol_str` is now `smol_str02`
- `semver` is now `semver1`
- `indexmap`, `uuid08`, `arrayvec05` and `bigdecimal03` have been removed
- `enumset`, `indexmap`, `uuid08`, `arrayvec05` and `bigdecimal03` have been removed
- `indexmap2`, `arrayvec07` and `bigdecimal04` are unchanged

## `Schema` is now a wrapper around `serde_json::Value`
Expand Down
1 change: 0 additions & 1 deletion docs/4-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Schemars can implement `JsonSchema` on types from several popular crates, enable
- `bytes1` - [bytes](https://crates.io/crates/bytes) (^1.0)
- `chrono04` - [chrono](https://crates.io/crates/chrono) (^0.4)
- `either1` - [either](https://crates.io/crates/either) (^1.3)
- `enumset1` - [enumset](https://crates.io/crates/enumset) (^1.0)
- `indexmap2` - [indexmap](https://crates.io/crates/indexmap) (^2.0)
- `rust_decimal1` - [rust_decimal](https://crates.io/crates/rust_decimal) (^1.0)
- `semver1` - [semver](https://crates.io/crates/semver) (^1.0.9)
Expand Down
5 changes: 0 additions & 5 deletions schemars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ bigdecimal04 = { version = "0.4", default-features = false, optional = true, pac
bytes1 = { version = "1.0", default-features = false, optional = true, package = "bytes" }
chrono04 = { version = "0.4", default-features = false, optional = true, package = "chrono" }
either1 = { version = "1.3", default-features = false, optional = true, package = "either" }
enumset1 = { version = "1.0", default-features = false, optional = true, package = "enumset" }
indexmap2 = { version = "2.0", default-features = false, optional = true, package = "indexmap" }
rust_decimal1 = { version = "1", default-features = false, optional = true, package = "rust_decimal"}
semver1 = { version = "1.0.9", default-features = false, optional = true, package = "semver" }
Expand Down Expand Up @@ -104,10 +103,6 @@ required-features = ["arrayvec07"]
name = "url"
required-features = ["url2"]

[[test]]
name = "enumset"
required-features = ["enumset1"]

[[test]]
name = "smol_str"
required-features = ["smol_str02"]
Expand Down
3 changes: 0 additions & 3 deletions schemars/src/json_schema_impls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ mod decimal;
#[cfg(feature = "either1")]
mod either1;

#[cfg(feature = "enumset1")]
forward_impl!((<T: enumset1::EnumSetType + crate::JsonSchema> crate::JsonSchema for enumset1::EnumSet<T>) => alloc::collections::BTreeSet<T>);

#[cfg(feature = "indexmap2")]
mod indexmap2;

Expand Down
18 changes: 0 additions & 18 deletions schemars/tests/enumset.rs

This file was deleted.

0 comments on commit 38a67a1

Please sign in to comment.