qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/11] rust: qemu_api_macros: make pattern matching more read


From: Zhao Liu
Subject: Re: [PATCH 05/11] rust: qemu_api_macros: make pattern matching more readable and efficient
Date: Tue, 6 May 2025 15:48:07 +0800

On Mon, May 05, 2025 at 11:04:30AM +0200, Paolo Bonzini wrote:
> Date: Mon,  5 May 2025 11:04:30 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 05/11] rust: qemu_api_macros: make pattern matching more
>  readable and efficient
> X-Mailer: git-send-email 2.49.0
> 
> "let ... else" is useful when visiting syntax trees; it avoids multiple
> levels of indentation and places the error close to the pattern.
> 
> While at it, use "ref" to avoid moving the syntax tree objects.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/qemu-api-macros/src/lib.rs | 84 +++++++++++++++------------------
>  1 file changed, 37 insertions(+), 47 deletions(-)

Good improvement!

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]