forked from wathiede/i3xs
This branch is 23 commits behind wathiede/i3xs:master
* Accept the format string as Into<String> rather than String to allow &str to be provided. * set_colors accepts Into<Vec<TimeColor>> rather than &[TimeColor]. The function needs a Vec<TimeColor>. Previously it would unconditionally clone the slice into a Vec, now it can accept a Vec if the user provides one and avoid an allocation in those cases (while still cloning a slice if that's what the user provides). * DateTime::colors was an Option<Vec<TimeColor>> it's now simply a Vec<TimeColor>. There was no difference in logic between a None and an empty Vec so the code could be simplified by removing the Option. * No longer allocate a String when formatting the time. * Collapse the logic setting color. Calculating whether to set a color and storing the result in Option<ColorRGB> only to then set data.color if the Option is Some, can be collapsed to simply set data.color if the configuration dictates.
Description
No description provided
Languages
Rust
100%