Say from_axes, which is what a constructor is called

`per_axis` on `PlaceDesc` and `Declared` builds a pair by asking for each
axis. `from_axis` beside it already names the three-argument form, so the
plural is the one that takes a function, and both follow Rust's convention
for a constructor rather than an invented word.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
iris-aiandClaude Opus 5 committed 2026-09-19 21:53:58 -04:00
1 parent 4d42f1c8ca
commit 40b89c1f79
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -648,7 +648,7 @@ impl Widgets {
pub(crate) fn declared_lens(&self, id: WidgetId) -> Declared {
let rules = self.size_rules(id);
let widget = self.get_dyn(id);
Declared::per_axis(|axis| {
Declared::from_axes(|axis| {
rules[axis].declared().or_else(|| {
// A hint still narrows the box where no rule does, which is
// how a widget with a natural pixel size -- an image, a gap