summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/identify.rs2
-rw-r--r--src/bin/ordiag.rs14
-rw-r--r--src/fujifilm/decompress.rs2
-rw-r--r--src/mp4/parse/mod.rs12
4 files changed, 15 insertions, 15 deletions
diff --git a/src/bin/identify.rs b/src/bin/identify.rs
index f05f693..d4a19f7 100644
--- a/src/bin/identify.rs
+++ b/src/bin/identify.rs
@@ -64,7 +64,7 @@ pub fn main() {
let rawfile = rawfile_from_file(&p, format);
match rawfile {
Ok(ref rawfile) => match rawfile.type_id() {
- Ok(type_id) => println!("{} {}", name, type_id),
+ Ok(type_id) => println!("{name} {type_id}"),
Err(err) => println!("Error getting type id {name}: {err}"),
},
Err(err) => {
diff --git a/src/bin/ordiag.rs b/src/bin/ordiag.rs
index 477c1b5..42fbf97 100644
--- a/src/bin/ordiag.rs
+++ b/src/bin/ordiag.rs
@@ -192,7 +192,7 @@ fn extract_rawdata(
println!("\tActive area: {:?}", rawdata.active_area());
print!("\tUser crop: {:?}", rawdata.user_crop());
if let Some(aspect_ratio) = rawdata.user_aspect_ratio() {
- println!(" {}", aspect_ratio);
+ println!(" {aspect_ratio}");
} else {
println!();
}
@@ -218,9 +218,9 @@ fn extract_rawdata(
println!("\tHas a linearization table.");
}
if let Some(as_shot) = rawdata.as_shot_neutral() {
- println!("\tAs Shot Neutral = {:?}", as_shot);
+ println!("\tAs Shot Neutral = {as_shot:?}");
} else if let Some(as_shot_xy) = rawdata.as_shot_white_xy() {
- println!("\tAs Shot XY = {:?}", as_shot_xy);
+ println!("\tAs Shot XY = {as_shot_xy:?}");
} else {
println!("\tNo White balance");
}
@@ -286,7 +286,7 @@ fn process_file(
println!("MIME type: {}", rawfile.mime_type());
if let Ok(type_id) = rawfile.type_id() {
println!("Vendor id: {}", rawfile.vendor_id().unwrap());
- println!("Type id: {:?}", type_id);
+ println!("Type id: {type_id:?}");
} else {
println!("Couldn't guess file type ID");
return;
@@ -296,21 +296,21 @@ fn process_file(
.as_ref()
.and_then(Value::string)
{
- println!("Make: {:?}", make);
+ println!("Make: {make:?}");
}
if let Some(model) = rawfile
.metadata_value("Exif.Image.Model")
.as_ref()
.and_then(Value::string)
{
- println!("Model: {:?}", model);
+ println!("Model: {model:?}");
}
if let Some(unique) = rawfile
.metadata_value("Exif.Image.UniqueCameraModel")
.as_ref()
.and_then(Value::string)
{
- println!("Unique Camera Model: {:?}", unique);
+ println!("Unique Camera Model: {unique:?}");
}
if let Some(sizes) = rawfile.thumbnail_sizes() {
diff --git a/src/fujifilm/decompress.rs b/src/fujifilm/decompress.rs
index b656830..b7e76a3 100644
--- a/src/fujifilm/decompress.rs
+++ b/src/fujifilm/decompress.rs
@@ -1188,7 +1188,7 @@ fn read_code<T: std::io::Read>(
};
// Validate code
if code < 0 || code >= q_table.total_values {
- panic!("Invalid code: {}", code);
+ panic!("Invalid code: {code}");
}
// Adjust code
if (code & 1) != 0 {
diff --git a/src/mp4/parse/mod.rs b/src/mp4/parse/mod.rs
index 4711a8f..19ee5c0 100644
--- a/src/mp4/parse/mod.rs
+++ b/src/mp4/parse/mod.rs
@@ -267,7 +267,7 @@ pub enum Error {
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{:?}", self)
+ write!(f, "{self:?}")
}
}
@@ -989,7 +989,7 @@ impl AvifContext {
.get(item_id, BoxType::PixelInformationBox)?
{
Some(ItemProperty::Channels(pixi)) => Ok(pixi.bits_per_channel.as_slice()),
- Some(other_property) => panic!("property key mismatch: {:?}", other_property),
+ Some(other_property) => panic!("property key mismatch: {other_property:?}"),
None => Ok(&[]),
}
}
@@ -1000,7 +1000,7 @@ impl AvifContext {
.get(self.primary_item.id, BoxType::ImageSpatialExtentsProperty)?
{
Some(ItemProperty::ImageSpatialExtents(ispe)) => Ok(ispe),
- Some(other_property) => panic!("property key mismatch: {:?}", other_property),
+ Some(other_property) => panic!("property key mismatch: {other_property:?}"),
None => {
fail_if(
self.strictness == ParseStrictness::Permissive,
@@ -1055,7 +1055,7 @@ impl AvifContext {
.get(self.primary_item.id, BoxType::ImageRotation)?
{
Some(ItemProperty::Rotation(irot)) => Ok(*irot),
- Some(other_property) => panic!("property key mismatch: {:?}", other_property),
+ Some(other_property) => panic!("property key mismatch: {other_property:?}"),
None => Ok(ImageRotation::D0),
}
}
@@ -1066,7 +1066,7 @@ impl AvifContext {
.get(self.primary_item.id, BoxType::ImageMirror)?
{
Some(ItemProperty::Mirroring(imir)) => Ok(imir),
- Some(other_property) => panic!("property key mismatch: {:?}", other_property),
+ Some(other_property) => panic!("property key mismatch: {other_property:?}"),
None => Ok(std::ptr::null()),
}
}
@@ -2416,7 +2416,7 @@ impl ItemPropertiesBox {
Ok(Some(ItemProperty::AuxiliaryType(urn))) => {
urn.aux_type.as_slice() == "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha".as_bytes()
}
- Ok(Some(other_property)) => panic!("property key mismatch: {:?}", other_property),
+ Ok(Some(other_property)) => panic!("property key mismatch: {other_property:?}"),
Ok(None) => false,
Err(e) => {
error!(