Squash to cast checking

This commit is contained in:
Andrew Champion committed 2020-01-02 12:47:39 +00:00
1 parent e6985063ac
commit 1c8e98bca5
1 file changed
+1 -1
+1 -1
View File
@@ -445,7 +445,7 @@ pub struct DirectoryEncoder<'a, W: 'a + Write + Seek> {
impl<'a, W: 'a + Write + Seek> DirectoryEncoder<'a, W> { impl<'a, W: 'a + Write + Seek> DirectoryEncoder<'a, W> {
fn new(writer: &'a mut TiffWriter<W>) -> TiffResult<DirectoryEncoder<'a, W>> { fn new(writer: &'a mut TiffWriter<W>) -> TiffResult<DirectoryEncoder<'a, W>> {
// the previous word is the IFD offset position // the previous word is the IFD offset position
let ifd_pointer_pos = writer.offset() - u64::try_from(mem::size_of::<u32>())?; let ifd_pointer_pos = writer.offset() - mem::size_of::<u32>() as u64;
writer.pad_word_boundary()?; writer.pad_word_boundary()?;
Ok(DirectoryEncoder { Ok(DirectoryEncoder {
writer, writer,