Skip to content

Commit b7b7988

Browse files
authored
feat: fix fork, add clippy test in CI (#5)
* 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]>
1 parent 54525bc commit b7b7988

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.github/workflows/rust.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ jobs:
5757
RUST_BACKTRACE: 1
5858
run: |
5959
cargo llvm-cov test --all-features
60+
- name: Run rust doc test
61+
env:
62+
RUST_BACKTRACE: 1
63+
run: |
64+
cargo test --doc --all-features
6065
- uses: codecov/codecov-action@v4
6166
if: runner.os == 'Linux' && matrix.rust_toolchain == 'stable'
6267
env:

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "bytesize"
2+
name = "foyer-bytesize"
33
description = "An utility for human-readable bytes representations. Forked from https://github.com/hyunsik/bytesize ."
4-
version = "1.4.0"
4+
version = "2.0.0"
55
authors = ["Hyunsik Choi <[email protected]>", "MrCroxx <[email protected]>"]
66
edition = "2021"
77

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ Features:
2121
- Use SI format by default with `Display`.
2222
- Use "KiB" for SI unit.
2323

24+
Considering the changes, the version of `foyer-bytesize` crate starts from "2" to differ from the original `bytesize` crate.
25+
2426
## Usage
2527

2628
Add this to your Cargo.toml:
2729

2830
```toml
2931
[dependencies]
30-
bytesize = { package = "foyer-bytesize", version = "1", features = ["serde"]}
32+
bytesize = { package = "foyer-bytesize", version = "2", features = ["serde"]}
3133
```
3234

3335
## Example

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
//! It also provides its human readable string as follows:
2222
//!
2323
//! ```
24+
//! # use foyer_bytesize as bytesize;
2425
//! use bytesize::ByteSize;
2526
//!
2627
//! assert_eq!("482.4 GiB", ByteSize::gb(518).to_string_as(true));

0 commit comments

Comments
 (0)