Skip to content

feature: support smol_str#350

Merged
gustavo-shigueo merged 2 commits intoAleph-Alpha:mainfrom
corvusrabus:feature/support-smolstr
Sep 7, 2024
Merged

feature: support smol_str#350
gustavo-shigueo merged 2 commits intoAleph-Alpha:mainfrom
corvusrabus:feature/support-smolstr

Conversation

@corvusrabus
Copy link
Copy Markdown
Contributor

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

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@gustavo-shigueo
Copy link
Copy Markdown
Collaborator

Hi @corvusrabus, thanks for the PR! Can you add a quick test for it please? That'll help avoid regressions in the future

@corvusrabus
Copy link
Copy Markdown
Contributor Author

Thanks @gustavo-shigueo. Sure I can do that but I don't see tests for any of the other similar fundamental datatypes like uuid-impl, bigdecimal-impl, ... either. Is it necessary?

@gustavo-shigueo
Copy link
Copy Markdown
Collaborator

gustavo-shigueo commented Sep 6, 2024

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

@corvusrabus
Copy link
Copy Markdown
Contributor Author

@gustavo-shigueo. I'll add them if you haven't done it yet

@corvusrabus
Copy link
Copy Markdown
Contributor Author

Added tests @gustavo-shigueo

@gustavo-shigueo
Copy link
Copy Markdown
Collaborator

Awesome! Thank you so much @corvusrabus

@gustavo-shigueo gustavo-shigueo merged commit 7577aca into Aleph-Alpha:main Sep 7, 2024
Comment thread README.md
| 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* |
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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

@NyxCode
Copy link
Copy Markdown
Collaborator

NyxCode commented Sep 7, 2024

@gustavo-shigueo there seems to be some CI failures on master

@gustavo-shigueo
Copy link
Copy Markdown
Collaborator

Oops, I missed on smolstr-impl

@gustavo-shigueo gustavo-shigueo added the enhancement New feature or request label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants