Page MenuHomeDevCentral

D2146.id5413.diff
No OneTemporary

D2146.id5413.diff

diff --git a/src/api/replies.rs b/src/api/replies.rs
--- a/src/api/replies.rs
+++ b/src/api/replies.rs
@@ -13,9 +13,6 @@
#[cfg(feature = "serialization")]
use serde::Serialize;
-#[cfg(feature = "pgsql")]
-use std::error::Error;
-
/* -------------------------------------------------------------
Custom types
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@@ -177,7 +174,7 @@
impl FailureResponse for ResultError {
/// Consumes the error and creates a 500 Internal server error Status response.
fn into_failure_response(self) -> Status {
- build_internal_server_error_response(self.description())
+ build_internal_server_error_response(&self.to_string())
}
}
diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -13,7 +13,6 @@
use kernel::{MinimalService, Service};
use rocket::Route;
use std::env;
-use std::error::Error;
use ErrorResult;
/* -------------------------------------------------------------
@@ -88,7 +87,7 @@
impl EnvironmentConfigurable for DefaultConfig {
fn parse_environment() -> ErrorResult<Self> {
if let Err(error) = dotenv() {
- warn!(target: "config", "Can't parse .env: {}", error.description());
+ warn!(target: "config", "Can't parse .env: {}", error);
};
let with_database = env::var("LF_DISABLE_DATABASE").is_err();
@@ -175,7 +174,7 @@
impl EnvironmentConfigurable for MinimalConfig {
fn parse_environment() -> ErrorResult<Self> {
if let Err(error) = dotenv() {
- warn!(target: "config", "Can't parse .env: {}", error.description());
+ warn!(target: "config", "Can't parse .env: {}", error);
};
let entry_point = env::var("API_ENTRY_POINT").unwrap_or(String::from("/"));
diff --git a/src/database.rs b/src/database.rs
--- a/src/database.rs
+++ b/src/database.rs
@@ -19,7 +19,6 @@
use rocket::request::Outcome as RequestOutcome;
use rocket::Request;
use rocket::State;
-use std::error::Error;
use std::ops::Deref;
/* -------------------------------------------------------------
@@ -46,7 +45,7 @@
match pool.get() {
Ok(connection) => Outcome::Success(DatabaseConnection(connection)),
Err(error) => {
- warn!(target:"request", "Can't get a connection from the pool: {}", error.description());
+ warn!(target:"request", "Can't get a connection from the pool: {}", error);
Outcome::Failure((Status::ServiceUnavailable, ()))
},
diff --git a/src/kernel.rs b/src/kernel.rs
--- a/src/kernel.rs
+++ b/src/kernel.rs
@@ -165,7 +165,7 @@
info!(target: "runner", "Server initialized.");
if let Err(error) = self.service.run() {
- error!(target: "runner", "{}", error.description());
+ error!(target: "runner", "{}", error);
process::exit(1);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 13:24 (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263035
Default Alt Text
D2146.id5413.diff (2 KB)

Event Timeline