From 2d3d5e2e8602901f90457dd565ea747e58702e07 Mon Sep 17 00:00:00 2001 From: Ron Kuris Date: Thu, 27 Apr 2023 00:28:13 +0000 Subject: [PATCH] 3/3: Code warning cleanup --- firewood/examples/rev.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firewood/examples/rev.rs b/firewood/examples/rev.rs index 2f1c59878..b7d808232 100644 --- a/firewood/examples/rev.rs +++ b/firewood/examples/rev.rs @@ -180,7 +180,7 @@ impl RevisionTracker { fn get_revision(&self, index: usize) -> Revision { self.db .get_revision(&self.hashes[index], None) - .expect(&format!("revision-{index} should exist")) + .unwrap_or_else(|| panic!("revision-{index} should exist")) } }