From 7d2830a2b1136922a162d14a2423ed6efd2e29dd Mon Sep 17 00:00:00 2001 From: Erwan Date: Mon, 13 Nov 2023 17:41:18 -0500 Subject: [PATCH] storage: use `expect` for db write --- crates/storage/src/storage.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/storage/src/storage.rs b/crates/storage/src/storage.rs index 809409fce3..e50b76891e 100644 --- a/crates/storage/src/storage.rs +++ b/crates/storage/src/storage.rs @@ -87,7 +87,8 @@ impl Storage { for prefix in default_prefixes { if !prefixes.contains(&prefix) { - db.put_cf(cf_config, prefix.as_bytes(), b"").unwrap(); + db.put_cf(cf_config, prefix.as_bytes(), b"") + .expect("can write to db"); prefixes.push(prefix); } }