From 3108d6dc176a58f2cb44f236b87a4c4f61b77de5 Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Wed, 5 Apr 2017 21:32:42 +0200 Subject: Replace unwrap with expect in public methods --- src/value.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/value.rs') diff --git a/src/value.rs b/src/value.rs index 3a366d8..5c59437 100644 --- a/src/value.rs +++ b/src/value.rs @@ -337,7 +337,7 @@ impl<'s, T: ?Sized> Index for &'s T where T: Index { impl fmt::Display for Value { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::ser::to_string(self).unwrap().fmt(f) + ::ser::to_string(self).expect("Unable to represent value as string").fmt(f) } } -- cgit v1.2.3