treewide: format with nightly rustfmt; auto-fix Clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: If4fd0511087dbaa65afc56a34d7c2f166a6a6964
This commit is contained in:
parent
fe45fff3f3
commit
3a03cf7b3e
26 changed files with 222 additions and 161 deletions
|
|
@ -51,7 +51,7 @@ pub enum CiError {
|
|||
}
|
||||
|
||||
impl CiError {
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn is_disk_full(&self) -> bool {
|
||||
let msg = self.to_string().to_lowercase();
|
||||
msg.contains("no space left on device")
|
||||
|
|
@ -186,19 +186,19 @@ pub struct DiskSpaceInfo {
|
|||
|
||||
impl DiskSpaceInfo {
|
||||
/// Check if disk space is critically low (less than 1GB available)
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn is_critical(&self) -> bool {
|
||||
self.available_gb < 1.0
|
||||
}
|
||||
|
||||
/// Check if disk space is low (less than 5GB available)
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn is_low(&self) -> bool {
|
||||
self.available_gb < 5.0
|
||||
}
|
||||
|
||||
/// Get a human-readable summary
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn summary(&self) -> String {
|
||||
format!(
|
||||
"Total: {:.1}GB, Free: {:.1}GB ({:.1}%), Available: {:.1}GB",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue