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:
@@ -5,5 +5,5 @@ edition = "2021"
|
|||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dev-dependencies]
|
||||||
png = "0.17.14"
|
png = "0.17.14"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use std::io::BufWriter;
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::{fs::File, io::Read};
|
use std::{fs::File, io::Read};
|
||||||
|
|
||||||
|
#[test]
|
||||||
fn main() -> Result<(), DecodeError> {
|
fn main() -> Result<(), DecodeError> {
|
||||||
let file = File::open("qoi_test_images/dice.qoi").unwrap();
|
let file = File::open("qoi_test_images/dice.qoi").unwrap();
|
||||||
let mut bytes = file.bytes()
|
let mut bytes = file.bytes()
|
||||||
Reference in New Issue
Block a user