From aa1a06781f0d5e234010fb1353b4d04085b7d1ab Mon Sep 17 00:00:00 2001 From: Vigith Maurice Date: Wed, 8 Jan 2025 06:08:31 -0800 Subject: [PATCH] Chore: add default for unwrap --- examples/raft-kv-memstore-grpc/src/pb_impl/impl_vote.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/raft-kv-memstore-grpc/src/pb_impl/impl_vote.rs b/examples/raft-kv-memstore-grpc/src/pb_impl/impl_vote.rs index 5d0a99c44..f4f58e3d3 100644 --- a/examples/raft-kv-memstore-grpc/src/pb_impl/impl_vote.rs +++ b/examples/raft-kv-memstore-grpc/src/pb_impl/impl_vote.rs @@ -27,7 +27,7 @@ impl fmt::Display for Vote { write!( f, "<{}:{}>", - self.leader_id.as_ref().unwrap(), + self.leader_id.as_ref().unwrap_or(&Default::default()), if self.is_committed() { "Q" } else { "-" } ) }