Fixed clippy, updated dependencies
Some checks failed
Build Project / test (push) Failing after 9m3s
Some checks failed
Build Project / test (push) Failing after 9m3s
This commit is contained in:
@@ -34,7 +34,7 @@ impl Database {
|
||||
Database { conn_pool: pool }
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Failed to connect to the database: {:?}", err);
|
||||
error!("Failed to connect to the database: {err:?}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ impl Database {
|
||||
match migrate!().run(&self.conn_pool).await {
|
||||
Ok(()) => {}
|
||||
Err(e) => {
|
||||
error!("Error when running migrations {}", e);
|
||||
error!("Error when running migrations {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
@@ -65,12 +65,13 @@ impl Database {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub async fn update_display_name(
|
||||
&self,
|
||||
device_id: &MacAddress,
|
||||
display_name: &str,
|
||||
) -> Result<(), DatabaseError> {
|
||||
info!("Adding Displayname {display_name} to Device with ID {device_id}");
|
||||
info!("Updating Displayname to {display_name} for Device with ID {device_id}");
|
||||
query!(
|
||||
"UPDATE Devices SET display_name = $1 WHERE id = $2;",
|
||||
display_name,
|
||||
@@ -93,7 +94,7 @@ impl Database {
|
||||
let exists = match exists_result {
|
||||
Ok(res) => res.count > Some(0),
|
||||
Err(err) => {
|
||||
error!("Error checking table existence: {:?}", err);
|
||||
error!("Error checking table existence: {err:?}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user