mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 21:34:50 +00:00
const-field-offset: fix a bunch of clippy warnings in tests
This commit is contained in:
parent
73ec3e6701
commit
4af34a8de1
3 changed files with 7 additions and 10 deletions
|
@ -100,8 +100,8 @@ mod tests {
|
|||
// Get a pointer to `b` within `Foo`
|
||||
let foo_b = Foo::FIELD_OFFSETS.b;
|
||||
let foo_b_pin = unsafe { foo_b.as_pinned_projection() };
|
||||
let foo = Box::pin(Foo { a: 21, b: 22.0, c: true });
|
||||
let pb: Pin<&f64> = foo_b_pin.apply_pin(foo.as_ref());
|
||||
let foo_object = Box::pin(Foo { a: 21, b: 22.0, c: true });
|
||||
let pb: Pin<&f64> = foo_b_pin.apply_pin(foo_object.as_ref());
|
||||
assert_eq!(*pb, 22.0);
|
||||
|
||||
let mut x = Box::pin(Bar { x: 0, y: Foo { a: 1, b: 52.0, c: false } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue