public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Kefu Chai" <k.chai@proxmox.com>
To: "Kefu Chai" <k.chai@proxmox.com>, <pve-devel@lists.proxmox.com>,
	"Wolfgang Bumiller" <w.bumiller@proxmox.com>
Subject: Re: [pve-devel] [PATCH proxmox-fuse-rs] Apply code formatting improvements for consistency
Date: Thu, 15 Jan 2026 12:00:36 +0800	[thread overview]
Message-ID: <DFOV2RLNZAOB.3C0D57SR4FCO9@proxmox.com> (raw)
In-Reply-To: <20260105140854.1216448-1-k.chai@proxmox.com>

Hey Wolfgang,

could you please help review this change as well at your convenience?
It's a lint change.


On Mon Jan 5, 2026 at 10:08 PM CST, Kefu Chai wrote:
> Changes:
> - Sort imports alphabetically in use statements
> - Add semicolon after return statement in error path
>
> Rationale:
> 1. Import ordering: Alphabetically sorted imports improve code readability
>    and reduce merge conflicts. Changed imports follow the pattern of
>    sorting type/struct names before function names within the same crate.
>
>    Examples:
>    - anyhow::{Error, bail, format_err} (Error before bail/format_err)
>    - tokio::signal::unix::{SignalKind, signal} (type before function)
>    - sys::{EntryParam, ROOT_ID, ReplyBufState} (alphabetical order)
>
> 2. Semicolon after return: In src/fuse_fd.rs:376, added semicolon after
>    the return statement for consistency with Rust style conventions.
>    While optional for return statements, rustfmt and most style guides
>    prefer explicit semicolons for uniformity.
>
> Impact:
> - No functional changes - purely stylistic improvements
> - Better alignment with standard Rust formatting tools (rustfmt)
> - Improved code consistency across the codebase
>
> Signed-off-by: Kefu Chai <k.chai@proxmox.com>
> ---
>  examples/tmpfs/main.rs | 4 ++--
>  src/fuse_fd.rs         | 2 +-
>  src/lib.rs             | 2 +-
>  src/session.rs         | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/examples/tmpfs/main.rs b/examples/tmpfs/main.rs
> index 8ca7f9e..0f7e9c2 100644
> --- a/examples/tmpfs/main.rs
> +++ b/examples/tmpfs/main.rs
> @@ -3,11 +3,11 @@ use std::ffi::OsStr;
>  use std::path::Path;
>  use std::{io, mem};
>  
> -use anyhow::{bail, format_err, Error};
> +use anyhow::{Error, bail, format_err};
>  use futures::future::FutureExt;
>  use futures::select;
>  use futures::stream::TryStreamExt;
> -use tokio::signal::unix::{signal, SignalKind};
> +use tokio::signal::unix::{SignalKind, signal};
>  
>  use proxmox_fuse::requests::{self, FuseRequest, SetTime};
>  use proxmox_fuse::{EntryParam, Fuse, ReplyBufState, Request};
> diff --git a/src/fuse_fd.rs b/src/fuse_fd.rs
> index 9205615..ae292b8 100644
> --- a/src/fuse_fd.rs
> +++ b/src/fuse_fd.rs
> @@ -374,7 +374,7 @@ fn poll_thread_inner(poll: Arc<Epoll>, fd: RawFd, state: Arc<PollState>) -> io::
>                      return Err(io::Error::new(
>                          io::ErrorKind::Other,
>                          "epoll_wait returned unexpected events",
> -                    ))
> +                    ));
>                  }
>              }
>          }
> diff --git a/src/lib.rs b/src/lib.rs
> index df509ec..32abbe9 100644
> --- a/src/lib.rs
> +++ b/src/lib.rs
> @@ -5,7 +5,7 @@ pub(crate) mod sys;
>  pub(crate) mod util;
>  
>  #[doc(inline)]
> -pub use sys::{EntryParam, ReplyBufState, ROOT_ID};
> +pub use sys::{EntryParam, ROOT_ID, ReplyBufState};
>  
>  #[doc(inline)]
>  pub use requests::Request;
> diff --git a/src/session.rs b/src/session.rs
> index a38593e..62a8a9e 100644
> --- a/src/session.rs
> +++ b/src/session.rs
> @@ -9,7 +9,7 @@ use std::sync::Arc;
>  use std::task::{Context, Poll};
>  use std::{io, mem};
>  
> -use anyhow::{bail, format_err, Error};
> +use anyhow::{Error, bail, format_err};
>  use futures::ready;
>  use futures::stream::{FusedStream, Stream};
>  



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2026-01-15  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 14:08 Kefu Chai
2026-01-15  4:00 ` Kefu Chai [this message]
2026-01-15 11:10 ` 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=DFOV2RLNZAOB.3C0D57SR4FCO9@proxmox.com \
    --to=k.chai@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=w.bumiller@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal