vec: readme: removed example

This commit is contained in:
nym21
2025-03-02 11:19:01 +01:00
parent 691952249b
commit 0453b6903a
-26
View File
@@ -10,32 +10,6 @@ A very small, fast, efficient and simple storable `vec` which uses `mmap2` for s
- [ ] Insert
- [ ] Remove
## Example
```rust
use std::path::Path;
use brk_vec::{AnyStorableVec, StorableVec};
fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
{
let mut vec: StorableVec<usize, u32> = StorableVec::import(Path::new("./v"))?;
vec.push(21);
dbg!(vec.get(0)?); // 21
vec.flush()?;
}
{
let vec: StorableVec<usize, u32> = StorableVec::import(Path::new("./v"))?;
dbg!(vec.get(0)?); // 21
}
Ok(())
}
```
## Disclaimer
Portability will depend on the type of values.