Skip to content

Commit

Permalink
view: 🌯 remove frivolous Option::expect call
Browse files Browse the repository at this point in the history
here, we are within an `if let Some(_)` clause that has already bound
the contents of the storage path. so, let's just pass that to
`Self::load` instead of unwrapping it again.
  • Loading branch information
cratelyn committed Mar 7, 2024
1 parent 60e2bd6 commit 412839a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/view/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,7 @@ impl Storage {
) -> anyhow::Result<Self> {
if let Some(path) = storage_path.as_ref() {
if path.as_ref().exists() {
return Self::load(
storage_path.expect(
"storage path is not `None` because we already matched on it above",
),
)
.await;
return Self::load(path).await;
}
};

Expand Down

0 comments on commit 412839a

Please sign in to comment.