Addressed some warnings, moved a few debug!() to trace!()
This commit is contained in:
+5
-5
@@ -7,24 +7,24 @@ use zip::result::ZipError;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error {
|
||||
pub(crate) message: String,
|
||||
pub(crate) _message: String,
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(value: std::io::Error) -> Self {
|
||||
return Error { message: value.to_string() }
|
||||
return Error { _message: value.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<reqwest::Error> for Error {
|
||||
fn from(value: reqwest::Error) -> Self {
|
||||
return Error { message: value.to_string() }
|
||||
return Error { _message: value.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ZipError> for Error {
|
||||
fn from(value: ZipError) -> Self {
|
||||
return Error { message: value.to_string() }
|
||||
return Error { _message: value.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ impl Preferences {
|
||||
let file_name_part = self.gtfs_url.split("/").last();
|
||||
if file_name_part.is_none() {
|
||||
error!("The config for gtfs-url is not a valid URL: {}", self.gtfs_url);
|
||||
return Err(Error {message: String::from("Failed to refresh GTFS data")});
|
||||
return Err(Error {_message: String::from("Failed to refresh GTFS data")});
|
||||
}
|
||||
return Ok(String::from(file_name_part.unwrap()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user