server: Change attribute values to bytes

This commit is contained in:
Valentin Tolmer
2022-08-07 17:43:46 +02:00
committed by nitnelave
parent 3acc448048
commit 697a64991d
6 changed files with 110 additions and 99 deletions

View File

@@ -126,6 +126,11 @@ impl From<&JpegPhoto> for String {
}
impl JpegPhoto {
pub fn into_bytes(self) -> Vec<u8> {
self.0
}
#[cfg(test)]
pub fn for_tests() -> Self {
use image::{ImageOutputFormat, Rgb, RgbImage};
let img = RgbImage::from_fn(32, 32, |x, y| {