ultimate-research / ssbh_lib

Reading and writing SSBH file formats in Rust
MIT License
8 stars 3 forks source link

investigate simplifying trait bounds for generic types #118

Closed ScanMountGoat closed 2 years ago

ScanMountGoat commented 2 years ago

It should be possible to move the bounds into the implementations of traits rather than the struct definition.

struct Generic<T>(T);

impl<T: BinRead> BinRead for Generic<T> {
    ...
}
ScanMountGoat commented 2 years ago

This also applies to generic functions used for conversion for ssbh_data for mesh and anim data.