Skip to content

Commit b7cf4df

Browse files
0.0.48
1 parent f4129fe commit b7cf4df

File tree

8 files changed

+537
-627
lines changed

8 files changed

+537
-627
lines changed

Cargo.lock

+31-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "chart-js-rs"
3-
version = "0.0.47"
3+
version = "0.0.48"
44
edition = "2021"
55
authors = ["Billy Sheppard", "Luis Moreno"]
66
license = "Apache-2.0"
@@ -16,19 +16,19 @@ gloo-console = { version = "0.3" }
1616
gloo-utils = { version = "0.2", features = ["serde"] }
1717
js-sys = "0.3.77"
1818
rust_decimal = "1.34"
19-
serde = { version = "1.0.217", features = ["derive"] }
20-
serde_json = "1"
19+
serde = { version = "1.0.218", features = ["derive"] }
20+
serde_json = "1.0.140"
2121
serde-wasm-bindgen = "0.6"
22-
thiserror = "2.0.11"
22+
thiserror = "2.0.12"
2323
wasm-bindgen = { version = "0.2.100", features = ["serde-serialize"] }
24-
uuid = { version = "1.12.1", features = ["v4"] }
24+
uuid = { version = "=1.12.1", features = ["v4"] }
2525

2626
[workspace]
2727
members = ["examples"]
2828

2929
[build-dependencies]
3030
heck = "0.5.0"
3131
itertools = "0.14.0"
32-
quote = "1.0.38"
33-
proc-macro2 = "1.0.93"
34-
syn = { features = ["parsing", "full"], version = "2.0.96" }
32+
quote = "1.0.39"
33+
proc-macro2 = "1.0.94"
34+
syn = { features = ["parsing", "full"], version = "2.0.99" }

build.rs

+12
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,18 @@ fn override_set_fn(s: &ItemStruct, field: &Field) -> Option<TokenStream> {
224224
return Some(iterator_set_fn);
225225
}
226226

227+
// for Option<Vec<T>>
228+
if type_segments[1].0 == "Vec" {
229+
let inner_t = &type_segments[2].1;
230+
let iterator_set_fn = quote! {
231+
pub fn #set_name<T: Into<#inner_t>, U: IntoIterator<Item = T>>(mut self, value: U) -> #s_name #type_params {
232+
self.#name = Some(value.into_iter().map(Into::into).collect());
233+
self
234+
}
235+
};
236+
return Some(iterator_set_fn);
237+
}
238+
227239
if type_segments[1].0 == "u32" {
228240
let type_ = &type_segments[1].1;
229241

0 commit comments

Comments
 (0)