[pbs-devel] [PATCH proxmox 8/8] router: replace clone with std::slice::from_ref

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Dec 9 11:52:48 CET 2025


This does not clone nor copy.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-router/src/cli/completion.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-router/src/cli/completion.rs b/proxmox-router/src/cli/completion.rs
index 091463de..2569f9a8 100644
--- a/proxmox-router/src/cli/completion.rs
+++ b/proxmox-router/src/cli/completion.rs
@@ -484,7 +484,7 @@ impl CompletionParser {
             // with no arguments remaining, the final global argument could need completion:
             if let Some((option, argument)) = global_args.last() {
                 if let Some(completion) =
-                    self.try_complete_global_property(option, &[argument.clone()])
+                    self.try_complete_global_property(option, std::slice::from_ref(argument))
                 {
                     return Ok(GlobalArgs::Completed(completion));
                 }
-- 
2.47.3





More information about the pbs-devel mailing list