Move main.rs to a test, drop dep on png crate

The codec library doesn't use any external dependencies. The PNG crate
is only to load some source material for testing the codec. Turning the
test driver into a real test lets me turn the PNG dependency into a
dev-dependency.
This commit is contained in:
2025-10-12 21:18:32 -05:00
parent 5ae4aa5823
commit e31aa5decb
2 changed files with 2 additions and 1 deletions

View File

@@ -5,5 +5,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[dev-dependencies]
png = "0.17.14"

View File

@@ -7,6 +7,7 @@ use std::io::BufWriter;
use std::path::Path;
use std::{fs::File, io::Read};
#[test]
fn main() -> Result<(), DecodeError> {
let file = File::open("qoi_test_images/dice.qoi").unwrap();
let mut bytes = file.bytes()