Addressed some warnings, moved a few debug!() to trace!()

This commit is contained in:
2026-05-25 07:49:47 +01:00
parent dc368ca811
commit 0a7a425ea7
3 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -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()));
}