From ce05eee80c5ba3981b3d31e307212d502191f3f8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 23 Sep 2016 05:20:04 +0000 Subject: [PATCH] Rust: style fix. --- artiq/runtime.rs/liblwip/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/artiq/runtime.rs/liblwip/lib.rs b/artiq/runtime.rs/liblwip/lib.rs index fb1903fa6..dca02c857 100644 --- a/artiq/runtime.rs/liblwip/lib.rs +++ b/artiq/runtime.rs/liblwip/lib.rs @@ -12,6 +12,7 @@ use core::cell::RefCell; use alloc::boxed::Box; use collections::LinkedList; use libc::c_void; +use std::error; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Error { @@ -56,13 +57,13 @@ impl Error { } } -impl std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Display for Error { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } -impl std::error::Error for Error { +impl error::Error for Error { fn description(&self) -> &str { self.as_str() }