mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-12-06 19:39:20 +01:00
Fix Clippy lints & GitHub Action improvements (#74)
* ci: improve - run on all branches to test things - no cargo color, it destroys actions-rs/cargo features - update versions * refactor(lint): fix clippy issues * refactor(lint): fix more clippy issues
This commit is contained in:
@@ -30,7 +30,7 @@ impl LoopDevice {
|
||||
);
|
||||
info!("Mounted {} to {}", file.display(), path.display());
|
||||
|
||||
Ok(LoopDevice { path, losetup })
|
||||
Ok(Self { path, losetup })
|
||||
}
|
||||
|
||||
pub fn path(&self) -> &Path {
|
||||
|
||||
@@ -68,7 +68,7 @@ pub fn get_storage_devices(allow_non_removable: bool) -> anyhow::Result<Vec<Devi
|
||||
.context("Could not parse block size to unsigned integer (u128)")?
|
||||
* 512,
|
||||
),
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
|
||||
@@ -21,7 +21,7 @@ impl<'a> StorageDevice<'a> {
|
||||
.context("Error querying information about the block device")?;
|
||||
let device_name = path
|
||||
.file_name()
|
||||
.and_then(|s| s.to_str())
|
||||
.and_then(std::ffi::OsStr::to_str)
|
||||
.map(String::from)
|
||||
.ok_or_else(|| anyhow!("Invalid device name: {}", path.display()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user