Bring the whole workspace into compliance with the repo's rustfmt config (edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted across many crates. Pure formatting — no logic changes; `cargo fmt --check` is now clean and `cargo build --workspace` is green.
11 lines
476 B
Rust
11 lines
476 B
Rust
use lawsynth_store::{MemoryStore, ObjectCache, ObjectKey, ObjectStore};
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let store = MemoryStore::default();
|
|
let key = ObjectKey::new("bundles/example.lsb")?;
|
|
let object = store.put(key.clone(), b"validated bundle bytes".to_vec())?;
|
|
let mut cache = ObjectCache::new(1024);
|
|
cache.insert(key.clone(), object);
|
|
println!("{} bytes cached", cache.get(&key).expect("inserted object").len());
|
|
Ok(())
|
|
}
|