-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: support smol_str #350
feature: support smol_str #350
Conversation
Hi @corvusrabus, thanks for the PR! Can you add a quick test for it please? That'll help avoid regressions in the future |
Thanks @gustavo-shigueo. Sure I can do that but I don't see tests for any of the other similar fundamental datatypes like |
I wouldn't say it's necessary - I mean, it's just a string, not much to break there lol -, but I do think it's a good idea. Also, thanks for pointing out those missing tests! I'll try to find some time to add them in the weekend |
@gustavo-shigueo. I'll add them if you haven't done it yet |
Added tests @gustavo-shigueo |
Awesome! Thank you so much @corvusrabus |
@@ -86,6 +86,7 @@ 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* | | |||
| smol_str-impl | Implement `TS` for types from *smol_str* | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the feature is called smol_str-impl
, but it's actually smolstr-impl
in Cargo.toml
.
I'd prefer smol_str-impl
everywhere, since that matches the <crate name>-impl
naming scheme we've got going on here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. I'll add it to this one #351
@gustavo-shigueo there seems to be some CI failures on master |
Oops, I missed on |
Goal
Add support for the widely used string crate
smol_str
(15m downloads from crates.io).The main and only type in the crate is
SmolStr
which is essentially a string with some optimisations.Checklist