kornelski / rust-rgb

struct RGB for sharing pixels between crates
https://lib.rs/rgb
MIT License
97 stars 19 forks source link

Implement traits for all types #82

Closed ripytide closed 2 months ago

ripytide commented 2 months ago

This does require a change in the Gray and GrayAlpha types to regular structs from tuple structs.

kornelski commented 2 months ago

Specifically for this Rust allows using 0: as a field name.

ripytide commented 2 months ago

Ah cool, I didn't know you could do that.

Regardless, I'd like to discuss the pros and cons of switching to a named struct over a tuple struct a bit more. I'll open an issue to make a case for the change.