aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-03-13 03:29:00 +0100
committerTeddy Wing2022-03-13 03:29:00 +0100
commit2acd2e9876bb6450db0f3b3713b975311c0f5322 (patch)
tree8ced1e2f7c5054c1e9969ee3af2a527cdc38b2bf /src/main.rs
parentcb3ab314425b29aa881597796d2c7deecfba025c (diff)
downloadyaqlite-2acd2e9876bb6450db0f3b3713b975311c0f5322.tar.bz2
insert(): Remove `unwrap()`s
Use a new `yaqlite::Error` type. Remove the other error types and use this main error type everywhere. For now, that seems simpler. The real reason why I centralised on one error type is that I wanted a single `Error::Sqlite` variant for both `rusqlite::Error` and `SqliteError` errors. However, I wasn't sure if it's possible to do that with `thiserror`, and I didn't want to bother having to write my own `std::error::Error` impls.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 0ac5a26..0ec2724 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,7 @@ fn main() {
let mut yaml_data = yaml::YamlLoader::load_from_str(&text_data).unwrap();
- yaqlite::insert(&mut dbconn, "people", &mut yaml_data);
+ yaqlite::insert(&mut dbconn, "people", &mut yaml_data).unwrap();
dbg!(yaml_data);