Skip to content

Commit

Permalink
0.1.9
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Delmas <[email protected]>
  • Loading branch information
tdelmas committed Jul 8, 2023
1 parent 99ec370 commit dcc8b3b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cargo publish
- name: cargo publish typed_floats_macros
run: cd typed_floats_macros && cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- name: cargo publish
run: cd typed_floats && cargo publish --token ${CRATES_TOKEN}
- name: cargo publish typed_floats
run: |
cd typed_floats
sed 's/, path = "..\/typed_floats_macros"//' Cargo.toml > Cargo.toml
cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

5 changes: 3 additions & 2 deletions typed_floats/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "typed_floats"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Types for handling floats with type checking at compile time."
repository = "https://github.com/tdelmas/floats"
readme = "./README.md"
keywords = ["float"]

[dependencies]
serde_json = { version = "1.0"}
thiserror = "1.0"
typed_floats_macros = { version = "0.1.8" }
typed_floats_macros = { version = "=0.1.9", path = "../typed_floats_macros" }

7 changes: 3 additions & 4 deletions typed_floats/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
This crate helps you to ensure the kind of floats you are using.

# NOT PRODUCTION READY YET

zero overhead: everything is checked at compile time.
(only `try_from` adds a little overhead at runtime)

`NaN` is rejected by all types.

The types provided by this crate are:
- `NonNaN`,`NonNaNFinite`, `NonZeroNonNaN`, `NonZeroNonNaNFinite`
Their positive and negative counterparts:

And their positive and negative counterparts:
- `Positive`,`PositiveFinite`, `StrictlyPositive`, `StrictlyPositiveFinite`
- `Negative`,`NegativeFinite`, `StrictlyNegative`, `StrictlyNegativeFinite`

By default all types are `f64` but you can use the `f32` like `Positive<f32>`.
By default all types are `f64` but all can use `f32` (e.g. like `Positive<f32>`).

The following conversions are implemented:
- Between all the types of this crate
Expand Down
2 changes: 1 addition & 1 deletion typed_floats_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "typed_floats_macros"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Crate only used to generate the `typed_floats` crate."
Expand Down

0 comments on commit dcc8b3b

Please sign in to comment.