~zethra/kitty-img

1a5e786f0ac22598757521b04d6893c7e92968ad — Sashanoraa 1 year, 7 months ago 6cf6927
Fix clippy error
1 files changed, 6 insertions(+), 6 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +6 -6
@@ 40,13 40,13 @@ fn main() {
    }
    let width = (img.width() as f32 / (img.height() as f32 / height as f32)) as u32;
    let path = format!("/tmp/pfp-{width}x{height}.png");
    if !Path::new(&path).exists() {
        if let Err(_) = resize(&img, width, height, image::imageops::FilterType::Nearest)
    if !Path::new(&path).exists()
        && resize(&img, width, height, image::imageops::FilterType::Nearest)
            .save_with_format(&path, image::ImageFormat::Png)
        {
            eprintln!("Error resizing image");
            exit(1);
        }
            .is_err()
    {
        eprintln!("Error resizing image");
        exit(1);
    }
    let b64 = BASE64_STANDARD.encode(&path);
    print!("\x1b_Ga=T,q=2,f=100,t=f;{b64}\x1b\\");