refactor persistency

This commit is contained in:
2019-05-05 19:16:52 +02:00
parent 073eb9011c
commit 89fa985005
6 changed files with 222 additions and 218 deletions

View File

@ -8,6 +8,12 @@ pub enum TextureFormat {
JPEG,
}
impl TextureFormat {
fn variants() -> &'static [TextureFormat] {
&[TextureFormat::PNG, TextureFormat::JPEG]
}
}
#[cfg(test)]
mod tests {
// Lol, I thought we would need custom code, like for Sha256, but it works out of the box :D