tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
968 stars 42 forks source link

Replace `rust-yaml` #289

Closed hasezoey closed 3 months ago

hasezoey commented 3 months ago

This PR replaces the crate rust-yaml with serde_yaml as rust-yaml did not have any updates for 3 years since writing and also the maintainer seems to not be contact-able (https://github.com/chyh1990/yaml-rust/issues/160). Though serde_yaml has also been archived (and deprecated) about 2 weeks ago (at time of writing), we now use a serde struct and could transition over to a different format (like json) easily, or wait until another serde yaml parser comes out (maybe serde_yml will be trusted?). At least for now serde_yaml will continue to work.

In additon this PR also cleans-up the usize casting for ColorTermusic.

Also now all the themes in /lib/themes/ will be tested to actually be load-able when running cargo test.

PS: the struct Alacritty could be replaced with the new Theme, though that would require a config transition, which is out-of-scope for this PR.