Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Nov 8, 2024
1 parent 3606fcd commit 44ff5b5
Show file tree
Hide file tree
Showing 12 changed files with 645 additions and 473 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ A flat container for Rust.

```toml
[dependencies]
flatcontainer = "0.4"
flatcontainer = "0.6"
```

## Example

```rust
use flatcontainer::FlatStack;
use flatcontainer::{Index, RegionPreference};

let r: Result<_, u16> = Ok("abc");
let mut c = FlatStack::default_impl::<Result<&str, u16>>();
c.copy(&r);
assert_eq!(r, c.get(0));
let mut c = <<Result<&str, u16> as RegionPreference>::Region>::default();
c.push(&r);
assert_eq!(r, c.index(0));
```

## Details
Expand Down
3 changes: 2 additions & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! A simple benchmark for flatcontainer, adopted from `columnation`'s benchmark.
/*
use codspeed_bencher_compat::{benchmark_group, benchmark_main, Bencher};
use flatcontainer::impls::deduplicate::{CollapseSequence, ConsecutiveIndexPairs};
use flatcontainer::impls::index::IndexOptimized;
Expand Down Expand Up @@ -524,3 +524,4 @@ benchmark_group!(
vec_u_vn_s_realloc,
);
benchmark_main!(clone, copy, copy_flat, copy_region, alloc);
*/
18 changes: 9 additions & 9 deletions src/impls.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//! Various region implementations.
pub mod codec;
pub mod columns;
pub mod deduplicate;
pub mod huffman_container;
pub mod index;
pub mod mirror;
pub mod option;
pub mod result;
// pub mod codec;
// pub mod columns;
// pub mod deduplicate;
// pub mod huffman_container;
// pub mod index;
// pub mod mirror;
// pub mod option;
// pub mod result;
pub mod slice;
pub mod slice_owned;
pub mod storage;
// pub mod storage;
pub mod string;
pub mod tuple;
mod vec;
Loading

0 comments on commit 44ff5b5

Please sign in to comment.