Explain runtime invariants and avoid redundant unwraps
This commit is contained in:
1 parent
34f2f07301
commit
1b51ba83b4
116 files changed
+1643
-515
No files matched your search
@@ -21,8 +21,12 @@ fn menu_positioner(
|
||||
};
|
||||
SctkPositioner {
|
||||
anchor_rect: rectangle,
|
||||
anchor: anchor.try_into().unwrap(),
|
||||
gravity: gravity.try_into().unwrap(),
|
||||
anchor: anchor
|
||||
.try_into()
|
||||
.expect("popup placement uses supported anchor and gravity combinations"),
|
||||
gravity: gravity
|
||||
.try_into()
|
||||
.expect("popup placement uses supported anchor and gravity combinations"),
|
||||
offset: (rectangle.width / 2, gap),
|
||||
size_limits: Limits::NONE
|
||||
.max_width(368.0)
|
||||
|
||||
Reference in new issue
Block a user