Remove StorageBackendError::explanation member

This commit is contained in:
Matthias Beyer 2015-12-02 11:39:04 +01:00
parent 9493c79104
commit c73cb88df4

View file

@ -164,20 +164,17 @@ impl StorageBackend {
pub struct StorageBackendError { pub struct StorageBackendError {
pub action: String, // The file system action in words pub action: String, // The file system action in words
pub desc: String, // A short description pub desc: String, // A short description
pub explanation: String, // A long, user friendly description
pub data_dump: Option<String> // Data dump, if any pub data_dump: Option<String> // Data dump, if any
} }
impl StorageBackendError { impl StorageBackendError {
fn new(action: String, fn new(action: String,
desc : String, desc : String,
explan: String,
data : Option<String>) -> StorageBackendError data : Option<String>) -> StorageBackendError
{ {
StorageBackendError { StorageBackendError {
action: action, action: action,
desc: desc, desc: desc,
explanation: explan,
data_dump: data, data_dump: data,
} }
} }
@ -197,8 +194,8 @@ impl Error for StorageBackendError {
impl Display for StorageBackendError { impl Display for StorageBackendError {
fn fmt(&self, f: &mut Formatter) -> FMTResult { fn fmt(&self, f: &mut Formatter) -> FMTResult {
write!(f, "StorageBackendError[{}]: {}\n\n{}", write!(f, "StorageBackendError[{}]: {}",
self.action, self.desc, self.explanation) self.action, self.desc)
} }
} }