[pdm-devel] [PATCH proxmox-datacenter-manager v5 6/6] fake remote: clippy fixes
Dominik Csapak
d.csapak at proxmox.com
Thu May 15 09:05:29 CEST 2025
Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>
On 5/12/25 13:41, Lukas Wagner wrote:
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
> ---
>
> Notes:
> Added in v3
>
> server/src/test_support/fake_remote.rs | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/server/src/test_support/fake_remote.rs b/server/src/test_support/fake_remote.rs
> index ae0f0af1..27ba7c5c 100644
> --- a/server/src/test_support/fake_remote.rs
> +++ b/server/src/test_support/fake_remote.rs
> @@ -1,4 +1,4 @@
> -use std::{collections::HashMap, sync::Arc, time::Duration};
> +use std::{sync::Arc, time::Duration};
>
> use anyhow::{bail, Error};
> use serde::Deserialize;
> @@ -129,7 +129,7 @@ impl pve_api_types::client::PveClient for FakePveClient {
> let mut vmid = 100;
>
> for _ in 0..self.nr_of_vms {
> - vmid = vmid + 1;
> + vmid += 1;
> result.push(ClusterResource {
> cgroup_mode: None,
> content: None,
> @@ -162,7 +162,7 @@ impl pve_api_types::client::PveClient for FakePveClient {
> }
>
> for _ in 0..self.nr_of_cts {
> - vmid = vmid + 1;
> + vmid += 1;
> result.push(ClusterResource {
> cgroup_mode: None,
> content: None,
> @@ -354,7 +354,6 @@ impl pve_api_types::client::PveClient for FakePveClient {
> async fn list_nodes(&self) -> Result<Vec<ClusterNodeIndexResponse>, proxmox_client::Error> {
> tokio::time::sleep(Duration::from_millis(self.api_delay_ms as u64)).await;
> Ok((0..self.nr_of_nodes)
> - .into_iter()
> .map(|i| ClusterNodeIndexResponse {
> node: format!("pve-{i}"),
> cpu: None,
> @@ -411,7 +410,6 @@ impl pve_api_types::client::PveClient for FakePveClient {
> let number_of_tasks = limit.min(number_of_tasks as u64);
>
> Ok((0..number_of_tasks)
> - .into_iter()
> .map(|i| make_task(now - i as i64 * NEW_TASK_EVERY * 60))
> .collect())
> }
More information about the pdm-devel
mailing list