From c69f97542a6071f78d48a743ee94119a93bc9471 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 1 Mar 2019 18:07:56 -0800 Subject: error: Consistently use Display instead of error description() The description method is deprecated and its signature forces less helpful error messages than what Display can provide. BUG=none TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu Change-Id: I27fc99d59d0ef457c5273dc53e4c563ef439c2c0 Reviewed-on: https://chromium-review.googlesource.com/1497735 Commit-Ready: David Tolnay Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: Dylan Reid --- sync/src/mutex.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sync') diff --git a/sync/src/mutex.rs b/sync/src/mutex.rs index 59c9f71..c479a2e 100644 --- a/sync/src/mutex.rs +++ b/sync/src/mutex.rs @@ -24,7 +24,6 @@ //! Developers should feel free to use sync::Mutex anywhere in crosvm that they //! would otherwise be using std::sync::Mutex. -use std::error::Error; use std::fmt::{self, Debug, Display}; use std::sync::{Mutex as StdMutex, MutexGuard, TryLockError}; @@ -119,4 +118,4 @@ impl Display for WouldBlock { } } -impl Error for WouldBlock {} +impl std::error::Error for WouldBlock {} -- cgit 1.4.1