Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding takes KeyOrValue, TEXTBOX_INSETS moves back to Env #1662

Merged
merged 2 commits into from
Mar 29, 2021

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Mar 18, 2021

two related commits; the first enabling the second.

This is more progress on #1652.

child: WidgetPod<T, W>,
}

/// `Insets`, types that impl `Into<Insts>`, or KeyOrValue<Insets>.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? Into<Insets>

Also, is there a reason this had to be a trait instead of just impl Into? I haven't been following closely so pls disregard if this is obvious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'd been over-thinking this. The problem is that we don't just accept Insets, we also accept things like f64 and (f64, f64), and I was thinking that to make those work we would need to have impl <T: Into<Insets>> Into<KeyOrValue<Insets>> for T, which wouldn't work because of coherence, but we can instead just manually impl Into<KeyOrValue<Insets>> for the various other arguments we want to accept, and that works fine. Thanks!

@cmyr cmyr merged commit fb684ef into master Mar 29, 2021
@cmyr cmyr deleted the padding-key-or-value branch March 29, 2021 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants