milkey-mouse / planets

A space game.
GNU General Public License v3.0
3 stars 1 forks source link

should SourceReader be a trait? #41

Open todo[bot] opened 5 years ago

todo[bot] commented 5 years ago

clippy seems to think so. the current enum variants would be separate structs implementing the trait, and boxed versions would be passed around. most things here are boxed anyway, so it wouldn't be too much perf loss. and of course, this is all premature optimization because I've never seen the audio thread take more than 10% CPU, even on debug mode.


https://github.com/milkey-mouse/planets/blob/d7abcfaca0994ffd04d54b206254bb04474d1c11/src/audio/source.rs#L25-L30


This issue was generated by todo based on a // TODO: comment in d7abcfaca0994ffd04d54b206254bb04474d1c11.