File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,16 @@ impl PredictorInfo<'_> {
69
69
/// # planar_configuration: PlanarConfiguration::Chunky,
70
70
/// };
71
71
///
72
+ /// assert_eq!(info.chunk_width_pixels(0).unwrap(), (8));
72
73
/// assert_eq!(info.chunk_width_pixels(1).unwrap(), (7));
73
74
/// info.chunk_width_pixels(2).unwrap_err();
74
75
/// ```
75
76
pub fn chunk_width_pixels ( & self , x : u32 ) -> AsyncTiffResult < u32 > {
76
77
if x >= self . chunks_across ( ) {
77
- return Err ( crate :: error:: AsyncTiffError :: TileIndexError (
78
+ Err ( crate :: error:: AsyncTiffError :: TileIndexError (
78
79
x,
79
80
self . chunks_across ( ) ,
80
- ) ) ;
81
+ ) )
81
82
} else if x == self . chunks_across ( ) - 1 {
82
83
// last chunk
83
84
Ok ( self . image_width - self . chunk_width * x)
@@ -108,6 +109,7 @@ impl PredictorInfo<'_> {
108
109
/// # planar_configuration: PlanarConfiguration::Chunky,
109
110
/// };
110
111
///
112
+ /// assert_eq!(info.chunk_height_pixels(0).unwrap(), (8));
111
113
/// assert_eq!(info.chunk_height_pixels(1).unwrap(), (7));
112
114
/// info.chunk_height_pixels(2).unwrap_err();
113
115
/// ```
You can’t perform that action at this time.
0 commit comments