new_item works via connection

This commit is contained in:
Sebastian Moser
2024-08-19 09:58:35 +02:00
parent f529fbd625
commit d0a1e26e96
8 changed files with 93 additions and 58 deletions

View File

@@ -16,6 +16,7 @@ pub fn create(sub_matches: &ArgMatches) -> MizeResult<()> {
let item = instance.new_item()?;
println!("id: {}", item.id());
println!("with namespace: {}", item.id().namespace().as_real_string());
return Ok(());
}

View File

@@ -15,7 +15,7 @@ use crate::core::id::MizeId;
use crate::item::get_raw_from_cbor;
use crate::instance::Instance;
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct FileStore {
path: PathBuf,
}
@@ -61,6 +61,7 @@ impl Store for FileStore {
.parse()
.mize_result_msg(format!("could not parse next_id at '{}' to u64", self.path.display()))?;
println!("nextid fsstore: {}", next_id);
let id_string = format!("{}", next_id);
next_id += 1;