Skip to content

Commit 460f121

Browse files
committed
Fix instantiation of collection objects with variables
1 parent 07aec73 commit 460f121

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/fs/metadata.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ pub struct Metadata {
4444

4545
impl From<Metadata> for Collection {
4646
fn from(val: Metadata) -> Self {
47-
let col: Collection = Object::builder()
48-
.property("title", val.info.title)
49-
.property("description", val.info.description)
50-
.property("version", val.info.version)
51-
.build();
47+
let col: Collection = Collection::new();
48+
col.set_properties(&[
49+
("title", &val.info.title),
50+
("description", &val.info.description),
51+
("version", &val.info.version),
52+
]);
5253

5354
if let Some(variables) = val.variables {
5455
for (variable_name, variable_info) in variables {

0 commit comments

Comments
 (0)