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

Suggestion: Add tuple conversions with From for Color #699

Closed
mehcode opened this issue Sep 1, 2017 · 2 comments
Closed

Suggestion: Add tuple conversions with From for Color #699

mehcode opened this issue Sep 1, 2017 · 2 comments

Comments

@mehcode
Copy link
Contributor

mehcode commented Sep 1, 2017

impl From<(u8, u8, u8)> for Color {
  // [...]
}

Would allow for a touch nicer ergonomics:

canvas.set_draw_color((22, 22, 22));
canvas.clear();
canvas.present();

Thoughts?

@Cobrand
Copy link
Member

Cobrand commented Sep 2, 2017

Sure!

shybyte added a commit to shybyte/rust-sdl2 that referenced this issue Nov 28, 2017
shybyte added a commit to shybyte/rust-sdl2 that referenced this issue Nov 28, 2017
Cobrand pushed a commit that referenced this issue Nov 29, 2017
@Cobrand
Copy link
Member

Cobrand commented Dec 12, 2017

Closed by #732

@Cobrand Cobrand closed this as completed Dec 12, 2017
sypwex pushed a commit to sypwex/rust-sdl2 that referenced this issue Jun 2, 2024
sypwex pushed a commit to sypwex/rust-sdl2 that referenced this issue Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants