Skip to content

Adds From<Point> and From<Size> for [f32; 2]#558

Merged
hecrj merged 1 commit into
iced-rs:masterfrom
Azorlogh:master
Oct 8, 2020
Merged

Adds From<Point> and From<Size> for [f32; 2]#558
hecrj merged 1 commit into
iced-rs:masterfrom
Azorlogh:master

Conversation

@Azorlogh
Copy link
Copy Markdown
Contributor

@Azorlogh Azorlogh commented Oct 8, 2020

Example use case:
An Axis { X, Y } enum with useful generic methods such as:
with_major<T: Into<[f32; 2]> + From<[f32; 2]>>(&self, coords: T, value: f32) -> T
(replace the corresponding coordinate in coords with value)

@hecrj hecrj added the feature New feature or request label Oct 8, 2020
@hecrj hecrj added this to the 0.2.0 milestone Oct 8, 2020
Copy link
Copy Markdown
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants