Rename decoding buffers
New names align better with conventions. In particular, Buffer refers to an owning type.
This commit is contained in:
1 parent
5696b0c78b
commit
860052a8f4
12 files changed
+178
-169
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
extern crate tiff;
|
||||
|
||||
use tiff::decoder::{Decoder, DecodingResult};
|
||||
use tiff::decoder::{Decoder, DecodingSampleBuffer};
|
||||
use tiff::encoder::{colortype, Predictor, TiffEncoder};
|
||||
use tiff::ColorType;
|
||||
|
||||
@@ -23,7 +23,7 @@ macro_rules! test_predict {
|
||||
decoder.next_image().unwrap();
|
||||
assert_eq!(decoder.colortype().unwrap(), expected_type);
|
||||
let image_data = match decoder.read_image().unwrap() {
|
||||
DecodingResult::$buffer(res) => res,
|
||||
DecodingSampleBuffer::$buffer(res) => res,
|
||||
_ => panic!("Wrong data type"),
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ macro_rules! test_predict_roundtrip {
|
||||
assert_eq!(decoder.colortype().unwrap(), expected_type);
|
||||
|
||||
let image_data = match decoder.read_image().unwrap() {
|
||||
DecodingResult::$buffer(res) => res,
|
||||
DecodingSampleBuffer::$buffer(res) => res,
|
||||
_ => panic!("Wrong data type"),
|
||||
};
|
||||
|
||||
@@ -147,7 +147,7 @@ macro_rules! test_predict_roundtrip {
|
||||
{
|
||||
let mut decoder = Decoder::open(&mut file).unwrap();
|
||||
decoder.next_image().unwrap();
|
||||
if let DecodingResult::$buffer(img_res) =
|
||||
if let DecodingSampleBuffer::$buffer(img_res) =
|
||||
decoder.read_image().expect("Decoding image failed")
|
||||
{
|
||||
assert_eq!(image_data, img_res);
|
||||
|
||||
Reference in new issue
Block a user