Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.1 #12

Merged
merged 19 commits into from
Oct 3, 2024
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "orderwal"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
repository = "https://github.com/al8n/orderwal"
homepage = "https://github.com/al8n/orderwal"
Expand Down Expand Up @@ -29,6 +29,7 @@ tracing = ["dep:tracing", "dbutils/tracing"]
among = { version = "0.1", default-features = false, features = ["either"] }
bitflags = { version = "1", default-features = false }
dbutils = { version = "0.4", default-features = false, features = ["crc32fast"] }
ref-cast = "1"
rarena-allocator = { version = "0.4", default-features = false, features = ["memmap"] }
crossbeam-skiplist = { version = "0.1", default-features = false, package = "crossbeam-skiplist-pr1132" }
paste = "1"
Expand Down
1 change: 1 addition & 0 deletions examples/generic_not_sized.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}
13 changes: 12 additions & 1 deletion examples/zero_cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,23 @@ fn main() {
let people = people.clone();
spawn(move || loop {
let (person, hello) = &people[i];
if let Some(p) = reader.get(&people[i].0) {
let person_ref = PersonRef {
id: person.id,
name: &person.name,
};
if let Some(p) = reader.get(person) {
assert_eq!(p.key().id, person.id);
assert_eq!(p.key().name, person.name);
assert_eq!(p.value(), hello);
break;
}

if let Some(p) = reader.get(&person_ref) {
assert_eq!(p.key().id, person.id);
assert_eq!(p.key().name, person.name);
assert_eq!(p.value(), hello);
break;
};
})
});

Expand Down
Loading
Loading