From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH pxar 1/3] tree wide: fix formatting via `cargo fmt`
Date: Wed, 27 Aug 2025 11:46:31 +0200 [thread overview]
Message-ID: <20250827094633.239975-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250827094633.239975-1-c.ebner@proxmox.com>
Code format cleanup only, no functional changes.
Signed-off-by: Christian Ebner <c.ebner@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-08-27 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 9:46 [pbs-devel] [PATCH pxar 0/3] pxar: make payload reference offset checks stricter Christian Ebner
2025-08-27 9:46 ` Christian Ebner [this message]
2025-08-27 9:46 ` [pbs-devel] [PATCH pxar 2/3] tree wide: elide explicit lifetimes reported by cargo clippy Christian Ebner
2025-08-27 9:46 ` [pbs-devel] [PATCH pxar 3/3] encoder: improve consistency check for payload reference offsets Christian Ebner
2025-08-27 12:36 ` [pbs-devel] applied-series: [PATCH pxar 0/3] pxar: make payload reference offset checks stricter Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250827094633.239975-2-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox