Skip to content

Commit 67cd817

Browse files
committed
fix: remove clippy warning
1 parent b3ff80a commit 67cd817

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

float-pigment-css/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ default = ["std", "deserialize", "serialize", "ffi"]
3939
std = ["serde/std", "serde_json/std", "bit-set/std", "num-traits/std", "half/std", "float-pigment-consistent-bincode/std"]
4040
no-std-lock = []
4141
wasm-entrance = ["wasm-bindgen", "console_log", "console_error_panic_hook", "js-sys"]
42+
nodejs-package = ["wasm-entrance"]
4243
build-cpp-header = ["cbindgen", "fs_extra"]
4344
serialize = []
4445
deserialize = []

float-pigment-css/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ But more, this module can be compiled to WebAssembly itself, and can be called f
1414
With [wasm-pack](https://github.com/rustwasm/wasm-pack) installed globally:
1515

1616
```shell
17-
wasm-pack build float-pigment-css --target nodejs --features wasm-entrance
17+
wasm-pack build float-pigment-css --target nodejs --features nodejs-package
1818
```
1919

2020

float-pigment-css/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub mod parser;
5858
#[cfg(debug_assertions)]
5959
use check_trait::CompatibilityCheck;
6060

61-
#[cfg(all(target_arch = "wasm32", feature = "wasm-entrance"))]
61+
#[cfg(all(target_arch = "wasm32", feature = "nodejs-package"))]
6262
fn init_logger() {
6363
use std::sync::Once;
6464
static INIT: Once = Once::new();
@@ -67,7 +67,8 @@ fn init_logger() {
6767
});
6868
}
6969

70-
#[cfg(all(target_arch = "wasm32", feature = "wasm-entrance"))]
70+
#[doc(hidden)]
71+
#[cfg(all(target_arch = "wasm32", feature = "nodejs-package"))]
7172
#[wasm_bindgen(start)]
7273
pub fn wasm_main() {
7374
init_logger();

float-pigment-css/src/property.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ property_value_format! (PropertyValueWithGlobal, {
343343
if let Some(column_gap) = column_gap {
344344
return (row_gap, column_gap);
345345
}
346-
return (row_gap.clone(), row_gap);
346+
(row_gap.clone(), row_gap)
347347
};
348348
}};
349349
flex_grow: {{ FlexGrow = <number> }};

0 commit comments

Comments
 (0)