Make `Bytes` pub

This commit is contained in:
Ivan Smirnov 2022-10-17 00:31:27 +01:00
parent 53ecac38a9
commit 9fdca30f9e
2 changed files with 7 additions and 1 deletions

View File

@ -230,7 +230,7 @@ pub trait Reader: Sized {
fn decode_image(&mut self, out: &mut [u8], channels: u8, src_channels: u8) -> Result<()>;
}
struct Bytes<'a>(&'a [u8]);
pub struct Bytes<'a>(&'a [u8]);
impl<'a> Bytes<'a> {
#[inline]

6
tests/test_misc.rs Normal file
View File

@ -0,0 +1,6 @@
#[test]
fn test_new_encoder() {
// this used to fail due to `Bytes` not being `pub`
let arr = [0u8];
let _ = qoi::Decoder::new(&arr[..]);
}