Skip to content

Commit

Permalink
feat: fix fork, add clippy test in CI (#5)
Browse files Browse the repository at this point in the history
* chore: release foyer-bytesize v2.0.0

Signed-off-by: MrCroxx <[email protected]>

* chore: fix doc test

Signed-off-by: MrCroxx <[email protected]>

* chore: add doc test on CI

Signed-off-by: MrCroxx <[email protected]>

---------

Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx committed Sep 10, 2024
1 parent 54525bc commit b7b7988
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
RUST_BACKTRACE: 1
run: |
cargo llvm-cov test --all-features
- name: Run rust doc test
env:
RUST_BACKTRACE: 1
run: |
cargo test --doc --all-features
- uses: codecov/codecov-action@v4
if: runner.os == 'Linux' && matrix.rust_toolchain == 'stable'
env:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bytesize"
name = "foyer-bytesize"
description = "An utility for human-readable bytes representations. Forked from https://github.com/hyunsik/bytesize ."
version = "1.4.0"
version = "2.0.0"
authors = ["Hyunsik Choi <[email protected]>", "MrCroxx <[email protected]>"]
edition = "2021"

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ Features:
- Use SI format by default with `Display`.
- Use "KiB" for SI unit.

Considering the changes, the version of `foyer-bytesize` crate starts from "2" to differ from the original `bytesize` crate.

## Usage

Add this to your Cargo.toml:

```toml
[dependencies]
bytesize = { package = "foyer-bytesize", version = "1", features = ["serde"]}
bytesize = { package = "foyer-bytesize", version = "2", features = ["serde"]}
```

## Example
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//! It also provides its human readable string as follows:
//!
//! ```
//! # use foyer_bytesize as bytesize;
//! use bytesize::ByteSize;
//!
//! assert_eq!("482.4 GiB", ByteSize::gb(518).to_string_as(true));
Expand Down

0 comments on commit b7b7988

Please sign in to comment.