From e309cb897f6b8c0274db54e02b567fa148b4cdca Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 28 Oct 2017 13:21:29 -0700 Subject: don't panic on unexpected Index type, just return Err --- src/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/protocol.rs b/src/protocol.rs index 0e1a449..a52c377 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -449,7 +449,7 @@ impl DatConnection { .copy_from_slice(&make_discovery_key(data_key)[0..32]); return Ok(()); } else { - unimplemented!("non-hyperdrive Index type: {}", index_msg.get_field_type()); + bail!("non-hyperdrive Index type: {}", index_msg.get_field_type()); } } } else { -- cgit v1.2.3