Skip to content
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

Is the std feature useful? #179

Open
pitdicker opened this issue Apr 16, 2024 · 3 comments
Open

Is the std feature useful? #179

pitdicker opened this issue Apr 16, 2024 · 3 comments

Comments

@pitdicker
Copy link
Contributor

The std feature controls only one thing: the error returned by Tz::from_str implements std::error::Error.
That is not useless, it is just such a small thing we wouldn't implement a feature for it otherwise.

@djc
Copy link
Member

djc commented Apr 17, 2024

I think both (a) being able to work in no_std contexts and (b) implementing std::error::Error for error types are valuable, and having a std feature doesn't seem like a big drag? So my answer would be yes.

@kentborg
Copy link

kentborg commented Oct 8, 2024

I've just started looking for some way to browse time zones, and get offsets from UTC for a given time zone. chrono-tz looks good…except I need no_std.

The comments above suggest it would be easy. Is it?

@djc
Copy link
Member

djc commented Oct 9, 2024

Like many crates, chrono-tz has a std feature. If you specify default-features = false in your Cargo.toml, that should allow chrono-tz to work in no_std environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants