Skip to content

Commit

Permalink
rename rustdecimal_impl and smolstr_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
corvusrabus committed Sep 7, 2024
1 parent 82acfec commit 285c644
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

- The `bson-uuid-impl` feature now supports `bson::oid::ObjectId` as well ([#340](https://github.com/Aleph-Alpha/ts-rs/pull/340))
- Allow multile types to have the same `#[ts(export_to = "...")]` attribute and be exported to the same file ([#316](https://github.com/Aleph-Alpha/ts-rs/pull/316))
- Add support for types from `smol_str` behind cargo feature `smolstr-impl`
- Add support for types from `rust_decimal` behind cargo feature `rustdecimal-impl`
- Add support for types from `smol_str` behind cargo feature `smol_str-impl`
- Add support for types from `rust_decimal` behind cargo feature `rust_decimal-impl`

### Fixes

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ When running `cargo test`, the TypeScript bindings will be exported to the file
| ordered-float-impl | Implement `TS` for types from *ordered_float* |
| heapless-impl | Implement `TS` for types from *heapless* |
| semver-impl | Implement `TS` for types from *semver* |
| smolstr-impl | Implement `TS` for types from *smol_str* |
| rustdecimal-impl | Implement `TS` for types from *rust_decimal* |
| smol_str-impl | Implement `TS` for types from *smol_str* |
| rust_decimal-impl | Implement `TS` for types from *rust_decimal* |

<br/>

Expand Down
4 changes: 2 additions & 2 deletions ts-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rust-version = "1.63.0"
[features]
chrono-impl = ["chrono"]
bigdecimal-impl = ["bigdecimal"]
rustdecimal-impl = ["rust_decimal"]
rust_decimal-impl = ["rust_decimal"]
uuid-impl = ["uuid"]
bson-uuid-impl = ["bson"]
bytes-impl = ["bytes"]
Expand All @@ -32,7 +32,7 @@ indexmap-impl = ["indexmap"]
ordered-float-impl = ["ordered-float"]
heapless-impl = ["heapless"]
semver-impl = ["semver"]
smolstr-impl = ["smol_str"]
smol_str-impl = ["smol_str"]
serde-json-impl = ["serde_json"]
no-serde-warnings = ["ts-rs-macros/no-serde-warnings"]
import-esm = []
Expand Down
8 changes: 4 additions & 4 deletions ts-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
//! | ordered-float-impl | Implement `TS` for types from *ordered_float* |
//! | heapless-impl | Implement `TS` for types from *heapless* |
//! | semver-impl | Implement `TS` for types from *semver* |
//! | smolstr-impl | Implement `TS` for types from *smol_str* |
//! | rustdecimal-impl | Implement `TS` for types from *rust_decimal* |
//! | smol_str-impl | Implement `TS` for types from *smol_str* |
//! | rust_decimal-impl | Implement `TS` for types from *rust_decimal* |
//!
//! <br/>
//!
Expand Down Expand Up @@ -996,10 +996,10 @@ impl_tuples!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10);
#[cfg(feature = "bigdecimal-impl")]
impl_primitives! { bigdecimal::BigDecimal => "string" }

#[cfg(feature = "rustdecimal-impl")]
#[cfg(feature = "rust_decimal-impl")]
impl_primitives! { rust_decimal::Decimal => "string" }

#[cfg(feature = "smolstr-impl")]
#[cfg(feature = "smol_str-impl")]
impl_primitives! { smol_str::SmolStr => "string" }

#[cfg(feature = "uuid-impl")]
Expand Down
4 changes: 2 additions & 2 deletions ts-rs/tests/integration/impl_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn impl_primitive_bigdecimal() {
<String as ts_rs::TS>::inline()
)
}
#[cfg(feature = "rustdecimal-impl")]
#[cfg(feature = "rust_decimal-impl")]
#[test]
fn impl_primitive_rustdecimal() {
assert_eq!(
Expand All @@ -22,7 +22,7 @@ fn impl_primitive_rustdecimal() {
<String as ts_rs::TS>::inline()
)
}
#[cfg(feature = "smolstr-impl")]
#[cfg(feature = "smol_str-impl")]
#[test]
fn impl_primitive_smolstr() {
assert_eq!(
Expand Down

0 comments on commit 285c644

Please sign in to comment.