-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Replace from_
constructors on TextFont
with From
impls
#20450
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
base: main
Are you sure you want to change the base?
Replace from_
constructors on TextFont
with From
impls
#20450
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
// 0.16 | ||
let text_font = TextFont::from_font(font_handle); | ||
let text_font = TextFont::from_line_height(line_height); | ||
|
||
// 0.17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed 0.17 cutoff so:
// 0.16 | |
let text_font = TextFont::from_font(font_handle); | |
let text_font = TextFont::from_line_height(line_height); | |
// 0.17 | |
// 0.17 | |
let text_font = TextFont::from_font(font_handle); | |
let text_font = TextFont::from_line_height(line_height); | |
// 0.18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intent here for this PR to wait until 0.17's release to get this change in? This otherwise seems trivial.
Objective
from_field
constructors onTextFont
withFrom
impls #20353Solution
TextFont::from_font
andTextFont::from_line_height
.examples/testbed/2d.rs
to use theForm
impl.