Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
refactor: remove unused const
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKominovic committed Sep 3, 2023
1 parent cd91502 commit f1c4065
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ use wallpaper;
// writer: Arc<AsyncMutex<Box<dyn Write + Send>>>,
// }

const IMAGES_SUPPORTED: [&str; 124] = [
"ase", "art", "bmp", "blp", "cd5", "cit", "cpt", "cr2", "cut", "dds", "dib", "djvu", "egt",
"exif", "gif", "gpl", "grf", "icns", "ico", "iff", "jng", "jpeg", "jpg", "jfif", "jp2", "jps",
"lbm", "max", "miff", "mng", "msp", "nef", "nitf", "ota", "pbm", "pc1", "pc2", "pc3", "pcf",
"pcx", "pdn", "pgm", "PI1", "PI2", "PI3", "pict", "pct", "pnm", "pns", "ppm", "psb", "psd",
"pdd", "psp", "px", "pxm", "pxr", "qfx", "raw", "rle", "sct", "sgi", "rgb", "int", "bw", "tga",
"tiff", "tif", "vtf", "xbm", "xcf", "xpm", "3dv", "amf", "ai", "awg", "cgm", "cdr", "cmx",
"dxf", "e2d", "egt", "eps", "fs", "gbr", "odg", "svg", "stl", "vrml", "x3d", "sxd", "v2d",
"vnd", "wmf", "emf", "art", "xar", "png", "webp", "jxr", "hdp", "wdp", "cur", "ecw", "iff",
"lbm", "liff", "nrrd", "pam", "pcx", "pgf", "sgi", "rgb", "rgba", "bw", "int", "inta", "sid",
"ras", "sun", "tga", "heic", "heif", "svg+xml",
];
#[derive(Serialize, Deserialize, Clone)]
struct File {
name: String,
Expand Down Expand Up @@ -123,7 +111,9 @@ fn read_file(path: String, skip_content: bool) -> File {
false => match length {
d if d < 10000000 => {
let content = read_binary(&path).unwrap();
println!("{} {}", path, content.len());

#[cfg(debug_assertions)]
println!("File read: {} {}", path, content.len());
let b64 = general_purpose::STANDARD.encode(content);
b64
}
Expand Down Expand Up @@ -341,8 +331,8 @@ fn main() {
#[cfg(debug_assertions)] // only include this code on debug builds
{
window.open_devtools();
window.close_devtools();
}
};

// let stderr = String::from_utf8(compiled.stderr).unwrap();
// let stdout = String::from_utf8(compiled.stdout).unwrap();

Expand Down

0 comments on commit f1c4065

Please sign in to comment.