Skip to content

Commit 9e378aa

Browse files
committed
[fix] test for labels.
1 parent 0bfe374 commit 9e378aa

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

crates/lambda-rs/src/render/buffer.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,8 @@ mod tests {
318318
fn label_is_recorded_on_builder() {
319319
let mut builder = BufferBuilder::new();
320320
builder.with_label("buffer-test");
321-
// Indirect check via building a small buffer would require a device; ensure
322-
// the label setter stores the value locally instead.
323-
// Access through an internal helper to avoid exposing label publicly.
324-
#[allow(clippy::redundant_closure_call)]
325-
{
326-
// Create a small closure to read the private label field.
327-
// The test module shares the parent scope, so it can access fields.
328-
let read = |b: &BufferBuilder| b.label.as_deref();
329-
assert_eq!(read(&builder), Some("buffer-test"));
330-
}
321+
// Indirect check: validate the internal label is stored on the builder.
322+
// Test module is a child of this module and can access private fields.
323+
assert_eq!(builder.label.as_deref(), Some("buffer-test"));
331324
}
332325
}

0 commit comments

Comments
 (0)