Convert to edition 2018
Notably, This enables NLL even on older compilers such as 1.34.
This commit is contained in:
1 parent
e72401d4ac
commit
8ab9d30eff
7 files changed
+17
-12
No files matched your search
@@ -15,6 +15,7 @@ license = "MIT"
|
|||||||
description = "TIFF decoding and encoding library in pure Rust"
|
description = "TIFF decoding and encoding library in pure Rust"
|
||||||
repository = "https://github.com/image-rs/image-tiff"
|
repository = "https://github.com/image-rs/image-tiff"
|
||||||
exclude = ["tests/images/*", "tests/fuzz_images/*"]
|
exclude = ["tests/images/*", "tests/fuzz_images/*"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
weezl = "0.1.0"
|
weezl = "0.1.0"
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ use std::io::{self, Read, Seek};
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use super::stream::{ByteOrder, EndianReader, SmartReader};
|
use super::stream::{ByteOrder, EndianReader, SmartReader};
|
||||||
use tags::{Tag, Type};
|
use crate::tags::{Tag, Type};
|
||||||
use {TiffError, TiffFormatError, TiffResult, TiffUnsupportedError};
|
use crate::{TiffError, TiffFormatError, TiffResult, TiffUnsupportedError};
|
||||||
|
|
||||||
use self::Value::{
|
use self::Value::{
|
||||||
Ascii, Byte, Double, Float, List, Rational, RationalBig, SRational, SRationalBig, Signed,
|
Ascii, Byte, Double, Float, List, Rational, RationalBig, SRational, SRationalBig, Signed,
|
||||||
|
|||||||
+4
-2
@@ -3,10 +3,12 @@ use std::collections::HashMap;
|
|||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::io::{self, Read, Seek};
|
use std::io::{self, Read, Seek};
|
||||||
|
|
||||||
use {ColorType, TiffError, TiffFormatError, TiffResult, TiffUnsupportedError};
|
use crate::{ColorType, TiffError, TiffFormatError, TiffResult, TiffUnsupportedError};
|
||||||
|
|
||||||
use self::ifd::Directory;
|
use self::ifd::Directory;
|
||||||
use tags::{CompressionMethod, PhotometricInterpretation, Predictor, SampleFormat, Tag, Type};
|
use crate::tags::{
|
||||||
|
CompressionMethod, PhotometricInterpretation, Predictor, SampleFormat, Tag, Type,
|
||||||
|
};
|
||||||
|
|
||||||
use self::stream::{
|
use self::stream::{
|
||||||
ByteOrder, DeflateReader, EndianReader, JpegReader, LZWReader, PackBitsReader, SmartReader,
|
ByteOrder, DeflateReader, EndianReader, JpegReader, LZWReader, PackBitsReader, SmartReader,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use tags::{PhotometricInterpretation, SampleFormat};
|
use crate::tags::{PhotometricInterpretation, SampleFormat};
|
||||||
|
|
||||||
/// Trait for different colortypes that can be encoded.
|
/// Trait for different colortypes that can be encoded.
|
||||||
pub trait ColorType {
|
pub trait ColorType {
|
||||||
|
|||||||
+3
-3
@@ -3,9 +3,9 @@ use std::convert::TryFrom;
|
|||||||
use std::io::{Seek, Write};
|
use std::io::{Seek, Write};
|
||||||
use std::{cmp, io, mem};
|
use std::{cmp, io, mem};
|
||||||
|
|
||||||
use bytecast;
|
use crate::bytecast;
|
||||||
use error::{TiffError, TiffFormatError, TiffResult};
|
use crate::error::{TiffError, TiffFormatError, TiffResult};
|
||||||
use tags::{self, ResolutionUnit, Tag, Type};
|
use crate::tags::{self, ResolutionUnit, Tag, Type};
|
||||||
|
|
||||||
pub mod colortype;
|
pub mod colortype;
|
||||||
mod writer;
|
mod writer;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use error::TiffResult;
|
use crate::error::TiffResult;
|
||||||
use std::io::{self, Seek, SeekFrom, Write};
|
use std::io::{self, Seek, SeekFrom, Write};
|
||||||
|
|
||||||
pub fn write_tiff_header<W: Write>(writer: &mut TiffWriter<W>) -> TiffResult<()> {
|
pub fn write_tiff_header<W: Write>(writer: &mut TiffWriter<W>) -> TiffResult<()> {
|
||||||
|
|||||||
+5
-3
@@ -3,10 +3,12 @@ use std::fmt;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::string;
|
use std::string;
|
||||||
|
|
||||||
use decoder::ifd::Value;
|
use crate::decoder::ifd::Value;
|
||||||
|
use crate::tags::{
|
||||||
|
CompressionMethod, PhotometricInterpretation, PlanarConfiguration, SampleFormat, Tag,
|
||||||
|
};
|
||||||
|
use crate::ColorType;
|
||||||
use miniz_oxide::inflate::TINFLStatus;
|
use miniz_oxide::inflate::TINFLStatus;
|
||||||
use tags::{CompressionMethod, PhotometricInterpretation, PlanarConfiguration, SampleFormat, Tag};
|
|
||||||
use ColorType;
|
|
||||||
|
|
||||||
/// Tiff error kinds.
|
/// Tiff error kinds.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|||||||
Reference in new issue
Block a user