Add recipes for date-time using std. Fixes #787. - #836
Merged
Conversation
AndyGauge
reviewed
Aug 11, 2026
AndyGauge
left a comment
Contributor
There was a problem hiding this comment.
benchmark example actually is just discarded by LLVM so its super ineffective at showing usefulness
AndyGauge
reviewed
Aug 19, 2026
Contributor
There was a problem hiding this comment.
None of the three snippets are rustfmt-formatted.
awk '/^```rust/{flag=1;next}/^```$/{flag=0}flag'
src/datetime/duration/benchmark.md > /tmp/snippet.rs
rustfmt --edition 2021 /tmp/snippet.rs
cat /tmp/snippet.rs # paste this back into the ```rust block
Repeat with convert_to_unix.md. or run cargo fmt on each snippet after pasting itinto a scratch .rs file locally
simplify to Duration::from_secs(1) directly as the math here isn't really highly re-usable.
Contributor
|
@randomctl I'm happy to make those suggestions, let me know if you need help getting rustfmt. |
Contributor
Author
Done! I thought I had run the rustfmt, maybe I lost it when doing additional changes. Sorry! I think now they are well formatted! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #787
cargo xtask test allhttps://docs.rs/tar/*/tar/struct.Entry.html