Skip to content

Commit 3119469

Browse files
committed
v0.10.0
1 parent 045a625 commit 3119469

File tree

5 files changed

+14
-18
lines changed

5 files changed

+14
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v0.10.0
2+
- (Routine Maintenance) Updated `rusqlite` from `0.30.0` to `0.31.0`.
3+
- This is a *breaking change,* requiring you to upgrade your `rusqlite` to match - trying to link against two different copies of `libsqlite3` will cause a compile fail.
4+
15
### v0.9.0
26
- (Routine Maintenance) Updated `rusqlite` from `0.29.0` to `0.30.0`.
37
- This is a *breaking change,* requiring you to upgrade your `rusqlite` to match - trying to link against two different copies of `libsqlite3` will cause a compile fail.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
]
88

99
[workspace.package]
10-
version = "0.9.0"
10+
version = "0.10.0"
1111
authors = ["Colonial"]
1212
edition = "2021"
1313
license = "MIT OR Apache-2.0"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The pain points I tried to fix were:
100100
- Needing to allocate and juggle a slice of `String` column names to efficiently deserialize rows - probably due to `serde` limitations?
101101
- Exemplar statically knows what columns to expect, so `from_row` requires no extra inputs and makes no superfluous allocations.
102102
- Odd design choices for field-less `enum`s - they are inefficiently serialized as `TEXT` instead of `INTEGER`. This was nice for debugging, but I figured the faster option should be Exemplar's default.
103-
- `to_params_named(&row1).unwrap().to_slice().as_slice()`
103+
- `to_params_named(&row1).unwrap().to_slice().as_slice()` doesn't quite roll off the tongue (although this is likely `serde` weirdness showing up again.)
104104
- Equivalent to `row1.insert(&conn)` or `row1.insert_with(&stmt)` in Exemplar.
105105
- General `serde` overhead popping up, both at compile and runtime.
106106
- Benchmarking shows that `serde_rusqlite` is ~25% slower on insert operations compared to Exemplar.

exemplar/Cargo.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ rustdoc-args = ["--cfg", "docsrs"]
1616

1717
[dependencies]
1818
exemplar_proc_macro = { version = "0.7.1" }
19-
rusqlite = "0.30.0"
19+
rusqlite = "0.31.0"
2020

2121
[dev-dependencies]
2222
anyhow = "1.0.75"
2323
criterion = "0.5.1"
2424
serde = "1.0.189"
25-
# Temporarily disabled; uses outdated rusqlite version.
26-
# serde_rusqlite = "0.33.1"
25+
serde_rusqlite = "0.35.0"
2726

2827
[[bench]]
2928
name = "binding_strategies"
@@ -33,10 +32,9 @@ harness = false
3332
name = "query_exemplar"
3433
harness = false
3534

36-
# Temporarily disabled; see above.
37-
# [[bench]]
38-
# name = "query_serde"
39-
# harness = false
35+
[[bench]]
36+
name = "query_serde"
37+
harness = false
4038

4139
[[bench]]
4240
name = "query_manual"

exemplar_proc_macro/src/util.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ pub fn get_check_path(ast: &DeriveInput) -> Option<String> {
9595
attr.path().is_ident("check")
9696
});
9797

98-
let Some(table) = table else {
99-
return None;
100-
};
98+
let table = table?;
10199

102100
let Ok(Lit::Str(str)) = table.parse_args::<Lit>() else {
103101
abort!(
@@ -148,9 +146,7 @@ pub fn get_bind_path(field: &Field) -> Option<Path> {
148146
attr.path().is_ident("bind")
149147
});
150148

151-
let Some(bind) = bind else {
152-
return None;
153-
};
149+
let bind = bind?;
154150

155151
let Ok(path) = bind.parse_args::<Path>() else {
156152
abort!(
@@ -172,9 +168,7 @@ pub fn get_extr_path(field: &Field) -> Option<ExprPath> {
172168
attr.path().is_ident("extr")
173169
});
174170

175-
let Some(extr) = extr else {
176-
return None;
177-
};
171+
let extr = extr?;
178172

179173
let Ok(path) = extr.parse_args::<ExprPath>() else {
180174
abort!(

0 commit comments

Comments
 (0)