Skip to content

Commit

Permalink
Re-implement Duration using primitives
Browse files Browse the repository at this point in the history
This simplifies the implementation in some places, due to not having to
constantly convert back and forth to the type in std. As an added bonus,
a number of methods are now const, and the size of the struct decreased
from 24 to 16 bytes.

Though some of the method signatures  change, this is necessary. Under
the old implementation, it was not possible to directly create a value
between 0 and -1 second.
  • Loading branch information
jhpratt committed Dec 24, 2019
1 parent f3acecf commit 733f90d
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 423 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "time"
version = "0.2.0"
version = "0.2.1"
authors = ["Jacob Pratt <the.z.cuber@gmail.com>"]
edition = "2018"
exclude = [".github", ".editorconfig", "rustfmt.toml"]
Expand Down
Loading

0 comments on commit 733f90d

Please sign in to comment.