From 509a8459e466ffa4705a0c686b80ac80b499f5d5 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 23 Dec 2014 09:26:52 -0800 Subject: Update to rust master --- src/knownhosts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/knownhosts.rs') diff --git a/src/knownhosts.rs b/src/knownhosts.rs index 52ee3b1..6fec25e 100644 --- a/src/knownhosts.rs +++ b/src/knownhosts.rs @@ -260,7 +260,7 @@ impl<'kh> Host<'kh> { pub fn name(&self) -> Option<&str> { unsafe { ::opt_bytes(self, (*self.raw).name as *const _) - .and_then(str::from_utf8) + .and_then(|s| str::from_utf8(s).ok()) } } -- cgit v1.2.3