-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Error Types, Serde Support, Improved
#![no_std]
Support (#10)
* tests/lib.rs: rename to datetime.rs * Cargo.toml: increment minor ver, remove anyhow dep, add optional serde dep, alloc + nightly features. * docs: Increment version, add features * Cargo.toml: no thiserror (until error in core is stabilized) * src*: custom error types and alloc feature * tests/*: tests using custom error types * src/*: fmt pass * tests/date.rs: fmt pass * tests/*: add serde tests * src/time.rs: missed serde derive * Cargo.toml: serde_json as dev dep for tests * src/util.rs: init StrWriter util * src/*: add `write_iso` functions for writing static buffers with ISO formatted characters * src/time.rs: truncate extra value on string * src/date.rs: error type renamed * src/util.rs: fix incorrect start index on buf * tests/*: extend for new no-alloc iso conversions * src/*: better docs of unsafe usage * src/*: fmt and clippy pass * tests/time.rs: fmt pass * src/*: update docstrings * README.md: update examples * dosctring correction static -> stack * workflows/rust.yml: codecov test on nightly * src/*: clone on error types, consistent formatting * tests/*: coverage * tests/error.rs: testing error displays * tests/error.rs: test From impls * add docs badge
- Loading branch information
Showing
11 changed files
with
792 additions
and
183 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "utc-dt" | ||
version = "0.2.1" | ||
version = "0.3.0" | ||
authors = ["Reece Kibble <[email protected]>"] | ||
categories = ["date-and-time", "no-std", "parsing"] | ||
keywords = ["time", "datetime", "date", "utc", "epoch"] | ||
|
@@ -17,7 +17,16 @@ exclude = [".git*"] | |
|
||
[features] | ||
default = ["std"] | ||
std = ["anyhow/std"] | ||
std = [ | ||
"alloc", | ||
"serde/std", | ||
] | ||
alloc = ["serde/alloc"] | ||
serde = ["dep:serde"] | ||
nightly = [] | ||
|
||
[dependencies] | ||
anyhow = { version = "1", default-features = false } | ||
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] } | ||
|
||
[dev-dependencies] | ||
serde_json = "1.0" |
This file contains 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
This file contains 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
Oops, something went wrong.