mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 23:38:11 +08:00
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition * Fixes * Clean up imports * Cargo fmt again --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
927d7dd9b2
commit
beb1c6ae64
@@ -4,11 +4,10 @@ mod types;
|
||||
pub mod values;
|
||||
|
||||
use file::TiffRead;
|
||||
use tags::Tag;
|
||||
|
||||
use num_enum::{FromPrimitive, IntoPrimitive};
|
||||
use std::fmt::Display;
|
||||
use std::io::{Read, Seek};
|
||||
use tags::Tag;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, FromPrimitive, IntoPrimitive)]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use super::types::{Array, ConstArray, TagType, TypeByte, TypeIfd, TypeLong, TypeNumber, TypeOrientation, TypeSRational, TypeSShort, TypeShort, TypeSonyToneCurve, TypeString};
|
||||
use super::{Ifd, TagId, TiffError, TiffRead};
|
||||
|
||||
use std::io::{Read, Seek};
|
||||
|
||||
pub trait SimpleTag {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use std::io::{Read, Seek};
|
||||
|
||||
use super::file::TiffRead;
|
||||
use super::values::{CurveLookupTable, Rational, Transform};
|
||||
use super::{Ifd, IfdTagType, TiffError};
|
||||
use std::io::{Read, Seek};
|
||||
|
||||
pub struct TypeAscii;
|
||||
pub struct TypeByte;
|
||||
@@ -41,11 +40,7 @@ impl PrimitiveType for TypeAscii {
|
||||
|
||||
fn read_primitive<R: Read + Seek>(_: IfdTagType, file: &mut TiffRead<R>) -> Result<Self::Output, TiffError> {
|
||||
let value = file.read_ascii()?;
|
||||
if value.is_ascii() {
|
||||
Ok(value)
|
||||
} else {
|
||||
Err(TiffError::InvalidValue)
|
||||
}
|
||||
if value.is_ascii() { Ok(value) } else { Err(TiffError::InvalidValue) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user