Skip to content

Commit 1a68965

Browse files
committed
cargo fmt
1 parent d42b439 commit 1a68965

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

src/writer/vegalite/layer.rs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ pub trait GeomRenderer: Send + Sync {
201201
} else {
202202
dataframe_to_values_with_bins(df, binned_columns)?
203203
};
204-
Ok(PreparedData::Single { values, metadata: Box::new(()) })
204+
Ok(PreparedData::Single {
205+
values,
206+
metadata: Box::new(()),
207+
})
205208
}
206209

207210
// === Phase 2: Encoding Modifications ===
@@ -629,10 +632,13 @@ impl GeomRenderer for PathRenderer {
629632
}
630633

631634
// Add segment_id to detail encoding
632-
encoding_map.insert("detail".to_string(), json!({
633-
"field": "__segment_id__",
634-
"type": "nominal"
635-
}));
635+
encoding_map.insert(
636+
"detail".to_string(),
637+
json!({
638+
"field": "__segment_id__",
639+
"type": "nominal"
640+
}),
641+
);
636642
}
637643
}
638644

@@ -4310,7 +4316,9 @@ mod tests {
43104316
let spec = &result[0];
43114317

43124318
// Check transforms exist
4313-
let transforms = spec["transform"].as_array().expect("Should have transforms");
4319+
let transforms = spec["transform"]
4320+
.as_array()
4321+
.expect("Should have transforms");
43144322
assert!(!transforms.is_empty());
43154323

43164324
// Check for window transform (lead operation)
@@ -4323,26 +4331,22 @@ mod tests {
43234331

43244332
// Check for detail encoding with segment_id
43254333
let encoding = spec["encoding"].as_object().unwrap();
4326-
assert!(encoding.contains_key("detail"), "Should have detail encoding");
4334+
assert!(
4335+
encoding.contains_key("detail"),
4336+
"Should have detail encoding"
4337+
);
43274338
assert_eq!(
4328-
encoding["detail"]["field"],
4329-
"__segment_id__",
4339+
encoding["detail"]["field"], "__segment_id__",
43304340
"Detail should use segment_id"
43314341
);
43324342

43334343
// Check that x/y use _final fields
43344344
assert!(
4335-
encoding["x"]["field"]
4336-
.as_str()
4337-
.unwrap()
4338-
.ends_with("_final"),
4345+
encoding["x"]["field"].as_str().unwrap().ends_with("_final"),
43394346
"x should use _final field"
43404347
);
43414348
assert!(
4342-
encoding["y"]["field"]
4343-
.as_str()
4344-
.unwrap()
4345-
.ends_with("_final"),
4349+
encoding["y"]["field"].as_str().unwrap().ends_with("_final"),
43464350
"y should use _final field"
43474351
);
43484352
}

0 commit comments

Comments
 (0)