[pbs-devel] [PATCH pxar 1/3] tree wide: fix formatting via `cargo fmt`

Christian Ebner c.ebner at proxmox.com
Wed Aug 27 11:46:31 CEST 2025


Code format cleanup only, no functional changes.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 examples/pxarcmd.rs  | 2 +-
 src/accessor/aio.rs  | 2 +-
 src/accessor/mod.rs  | 2 +-
 src/accessor/sync.rs | 2 +-
 src/decoder/mod.rs   | 2 +-
 src/lib.rs           | 2 +-
 tests/compat.rs      | 2 +-
 tests/simple/fs.rs   | 8 ++++----
 tests/simple/main.rs | 4 ++--
 9 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/examples/pxarcmd.rs b/examples/pxarcmd.rs
index 0294eba..d0f7d97 100644
--- a/examples/pxarcmd.rs
+++ b/examples/pxarcmd.rs
@@ -5,9 +5,9 @@ use std::os::linux::fs::MetadataExt;
 use std::os::unix::ffi::OsStrExt;
 use std::path::{Path, PathBuf};
 
+use pxar::Metadata;
 use pxar::accessor::Accessor;
 use pxar::encoder::{Encoder, LinkOffset, SeqWrite};
-use pxar::Metadata;
 
 macro_rules! format_err {
     ($($msg:tt)+) => {
diff --git a/src/accessor/aio.rs b/src/accessor/aio.rs
index eb89f8f..7cd7f87 100644
--- a/src/accessor/aio.rs
+++ b/src/accessor/aio.rs
@@ -13,7 +13,7 @@ use std::pin::Pin;
 use std::sync::Arc;
 use std::task::{Context, Poll};
 
-use crate::accessor::{self, cache::Cache, ContentRange, MaybeReady, ReadAt, ReadAtOperation};
+use crate::accessor::{self, ContentRange, MaybeReady, ReadAt, ReadAtOperation, cache::Cache};
 use crate::decoder::aio::Decoder;
 use crate::format::GoodbyeItem;
 use crate::util;
diff --git a/src/accessor/mod.rs b/src/accessor/mod.rs
index 48605eb..dd8aece 100644
--- a/src/accessor/mod.rs
+++ b/src/accessor/mod.rs
@@ -5,7 +5,7 @@
 use std::ffi::{OsStr, OsString};
 use std::future::Future;
 use std::io;
-use std::mem::{self, size_of, size_of_val, MaybeUninit};
+use std::mem::{self, MaybeUninit, size_of, size_of_val};
 use std::ops::Range;
 use std::os::unix::ffi::{OsStrExt, OsStringExt};
 use std::path::{Path, PathBuf};
diff --git a/src/accessor/sync.rs b/src/accessor/sync.rs
index 76e8c03..93b26d0 100644
--- a/src/accessor/sync.rs
+++ b/src/accessor/sync.rs
@@ -7,7 +7,7 @@ use std::pin::Pin;
 use std::sync::Arc;
 use std::task::Context;
 
-use crate::accessor::{self, cache::Cache, ContentRange, MaybeReady, ReadAt, ReadAtOperation};
+use crate::accessor::{self, ContentRange, MaybeReady, ReadAt, ReadAtOperation, cache::Cache};
 use crate::decoder::Decoder;
 use crate::format::GoodbyeItem;
 use crate::util::poll_result_once;
diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs
index eca51b6..c6a0cda 100644
--- a/src/decoder/mod.rs
+++ b/src/decoder/mod.rs
@@ -7,7 +7,7 @@
 use std::ffi::OsString;
 use std::future::poll_fn;
 use std::io;
-use std::mem::{self, size_of, size_of_val, MaybeUninit};
+use std::mem::{self, MaybeUninit, size_of, size_of_val};
 use std::ops::Range;
 use std::os::unix::ffi::{OsStrExt, OsStringExt};
 use std::path::{Path, PathBuf};
diff --git a/src/lib.rs b/src/lib.rs
index e0c5498..8c62127 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,7 +21,7 @@ pub mod decoder;
 pub mod encoder;
 
 #[doc(inline)]
-pub use format::{mode, Stat};
+pub use format::{Stat, mode};
 
 /// File metadata found in pxar archives.
 ///
diff --git a/tests/compat.rs b/tests/compat.rs
index c9e681a..d26e9bf 100644
--- a/tests/compat.rs
+++ b/tests/compat.rs
@@ -4,7 +4,7 @@ use std::io::{self, Read};
 
 use endian_trait::Endian;
 
-use pxar::{decoder, format, EntryKind};
+use pxar::{EntryKind, decoder, format};
 
 fn write_raw_struct<T: Endian, W: io::Write + ?Sized>(output: &mut W, data: T) -> io::Result<()> {
     let data = data.to_le();
diff --git a/tests/simple/fs.rs b/tests/simple/fs.rs
index 39d1294..1e3b913 100644
--- a/tests/simple/fs.rs
+++ b/tests/simple/fs.rs
@@ -2,14 +2,14 @@ use std::collections::HashMap;
 use std::io::Read;
 use std::path::{Path, PathBuf};
 
-use pxar::decoder::sync as decoder;
+use pxar::EntryKind as PxarEntryKind;
+use pxar::Metadata;
 use pxar::decoder::SeqRead;
+use pxar::decoder::sync as decoder;
 use pxar::encoder::sync as encoder;
 use pxar::encoder::{LinkOffset, SeqWrite};
 use pxar::format::acl::{self, Permissions};
-use pxar::format::{mode, Device};
-use pxar::EntryKind as PxarEntryKind;
-use pxar::Metadata;
+use pxar::format::{Device, mode};
 
 use crate::Error;
 
diff --git a/tests/simple/main.rs b/tests/simple/main.rs
index e403184..dcc5667 100644
--- a/tests/simple/main.rs
+++ b/tests/simple/main.rs
@@ -1,11 +1,11 @@
 use std::io::Read;
 use std::path::Path;
 
+use pxar::EntryKind as PxarEntryKind;
 use pxar::accessor::sync as accessor;
 use pxar::decoder::sync as decoder;
-use pxar::encoder::sync as encoder;
 use pxar::encoder::SeqWrite;
-use pxar::EntryKind as PxarEntryKind;
+use pxar::encoder::sync as encoder;
 
 macro_rules! format_err {
     ($($msg:tt)+) => {
-- 
2.47.2





More information about the pbs-devel mailing list