Skip to content

Commit

Permalink
fix: remove clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
LastLeaf committed Dec 26, 2024
1 parent b3ff80a commit 67cd817
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions float-pigment-css/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ default = ["std", "deserialize", "serialize", "ffi"]
std = ["serde/std", "serde_json/std", "bit-set/std", "num-traits/std", "half/std", "float-pigment-consistent-bincode/std"]
no-std-lock = []
wasm-entrance = ["wasm-bindgen", "console_log", "console_error_panic_hook", "js-sys"]
nodejs-package = ["wasm-entrance"]
build-cpp-header = ["cbindgen", "fs_extra"]
serialize = []
deserialize = []
Expand Down
2 changes: 1 addition & 1 deletion float-pigment-css/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ But more, this module can be compiled to WebAssembly itself, and can be called f
With [wasm-pack](https://github.com/rustwasm/wasm-pack) installed globally:

```shell
wasm-pack build float-pigment-css --target nodejs --features wasm-entrance
wasm-pack build float-pigment-css --target nodejs --features nodejs-package
```


Expand Down
5 changes: 3 additions & 2 deletions float-pigment-css/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub mod parser;
#[cfg(debug_assertions)]
use check_trait::CompatibilityCheck;

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

#[cfg(all(target_arch = "wasm32", feature = "wasm-entrance"))]
#[doc(hidden)]
#[cfg(all(target_arch = "wasm32", feature = "nodejs-package"))]
#[wasm_bindgen(start)]
pub fn wasm_main() {
init_logger();
Expand Down
2 changes: 1 addition & 1 deletion float-pigment-css/src/property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ property_value_format! (PropertyValueWithGlobal, {
if let Some(column_gap) = column_gap {
return (row_gap, column_gap);
}
return (row_gap.clone(), row_gap);
(row_gap.clone(), row_gap)
};
}};
flex_grow: {{ FlexGrow = <number> }};
Expand Down

0 comments on commit 67cd817

Please sign in to comment.