all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v2 09/12] examples/tests: add missing generics
Date: Mon, 26 May 2025 16:14:42 +0200	[thread overview]
Message-ID: <20250526141445.228717-10-h.laimer@proxmox.com> (raw)
In-Reply-To: <20250526141445.228717-1-h.laimer@proxmox.com>

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 pbs-datastore/examples/ls-snapshots.rs | 4 ++--
 tests/prune.rs                         | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pbs-datastore/examples/ls-snapshots.rs b/pbs-datastore/examples/ls-snapshots.rs
index 2eeea489..cf860a05 100644
--- a/pbs-datastore/examples/ls-snapshots.rs
+++ b/pbs-datastore/examples/ls-snapshots.rs
@@ -2,7 +2,7 @@ use std::path::PathBuf;
 
 use anyhow::{bail, Error};
 
-use pbs_datastore::DataStore;
+use pbs_datastore::{chunk_store::Read as R, DataStore};
 
 fn run() -> Result<(), Error> {
     let base: PathBuf = match std::env::args().nth(1) {
@@ -18,7 +18,7 @@ fn run() -> Result<(), Error> {
         None => None,
     };
 
-    let store = unsafe { DataStore::open_path("", base, None)? };
+    let store = unsafe { DataStore::<R>::open_path("", base, None)? };
 
     for ns in store.recursive_iter_backup_ns_ok(Default::default(), max_depth)? {
         println!("found namespace store:/{}", ns);
diff --git a/tests/prune.rs b/tests/prune.rs
index b11449ca..02de1078 100644
--- a/tests/prune.rs
+++ b/tests/prune.rs
@@ -4,10 +4,10 @@ use anyhow::Error;
 
 use pbs_api_types::{PruneJobOptions, MANIFEST_BLOB_NAME};
 use pbs_datastore::prune::compute_prune_info;
-use pbs_datastore::{BackupDir, BackupInfo};
+use pbs_datastore::{chunk_store::Read as R, BackupDir, BackupInfo};
 
 fn get_prune_list(
-    list: Vec<BackupInfo>,
+    list: Vec<BackupInfo<R>>,
     return_kept: bool,
     options: &PruneJobOptions,
 ) -> Vec<PathBuf> {
@@ -27,7 +27,7 @@ fn get_prune_list(
         .collect()
 }
 
-fn create_info(snapshot: &str, partial: bool) -> BackupInfo {
+fn create_info(snapshot: &str, partial: bool) -> BackupInfo<R> {
     let backup_dir = BackupDir::new_test(snapshot.parse().unwrap());
 
     let mut files = Vec::new();
@@ -43,7 +43,7 @@ fn create_info(snapshot: &str, partial: bool) -> BackupInfo {
     }
 }
 
-fn create_info_protected(snapshot: &str, partial: bool) -> BackupInfo {
+fn create_info_protected(snapshot: &str, partial: bool) -> BackupInfo<R> {
     let mut info = create_info(snapshot, partial);
     info.protected = true;
     info
-- 
2.39.5



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


  parent reply	other threads:[~2025-05-26 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 14:14 [pbs-devel] [PATCH proxmox-backup v2 00/12] introduce typestate for datastore/chunkstore Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 01/12] chunkstore: add CanRead and CanWrite trait Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 02/12] chunkstore: separate functions into impl block Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 03/12] datastore: add generics and new lookup functions Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 04/12] datastore: separate functions into impl block Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 05/12] backup_info: add generics and separate functions into impl blocks Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 06/12] pbs-datastore: " Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 07/12] api: backup: env: add generics and separate functions into impl block Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 08/12] api/backup/bin/server/tape: add missing generics Hannes Laimer
2025-05-26 14:14 ` Hannes Laimer [this message]
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 10/12] api: admin: pull datastore loading out of check_privs helper Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 11/12] datastore: move `fn gc_running` out of DataStoreImpl Hannes Laimer
2025-05-26 14:14 ` [pbs-devel] [PATCH proxmox-backup v2 12/12] api/server: replace datastore_lookup with new, state-typed datastore returning functions Hannes Laimer

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=20250526141445.228717-10-h.laimer@proxmox.com \
    --to=h.laimer@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal