Fix lint errors

Signed-off-by: trivernis <trivernis@protonmail.com>
axtloss/rework-partitioning
trivernis 2 years ago
parent a76d27f5d1
commit f9b775eff1
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -73,7 +73,7 @@ pub fn install_bootloader_legacy(device: PathBuf) {
exec_eval( exec_eval(
exec_chroot( exec_chroot(
"grub-install", "grub-install",
vec![String::from("--target=i386-pc"), String::from(device)], vec![String::from("--target=i386-pc"), device],
), ),
"install grub as legacy", "install grub as legacy",
); );

@ -1,7 +1,7 @@
use crate::args::PartitionMode; use crate::args::PartitionMode;
use crate::internal::exec::*; use crate::internal::exec::*;
use crate::internal::*; use crate::internal::*;
use std::path::PathBuf; use std::path::{Path, PathBuf};
pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool) { pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool) {
if !device.exists() { if !device.exists() {
@ -27,7 +27,7 @@ pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool) {
} }
} }
fn partition_no_efi(device: &PathBuf) { fn partition_no_efi(device: &Path) {
let device = device.to_string_lossy().to_string(); let device = device.to_string_lossy().to_string();
exec_eval( exec_eval(
exec( exec(
@ -61,7 +61,7 @@ fn partition_no_efi(device: &PathBuf) {
"parted", "parted",
vec![ vec![
String::from("-s"), String::from("-s"),
String::from(device), device,
String::from("mkpart"), String::from("mkpart"),
String::from("primary"), String::from("primary"),
String::from("btrfs"), String::from("btrfs"),
@ -73,7 +73,7 @@ fn partition_no_efi(device: &PathBuf) {
); );
} }
fn partition_with_efi(device: &PathBuf) { fn partition_with_efi(device: &Path) {
let device = device.to_string_lossy().to_string(); let device = device.to_string_lossy().to_string();
exec_eval( exec_eval(
exec( exec(
@ -106,7 +106,7 @@ fn partition_with_efi(device: &PathBuf) {
"parted", "parted",
vec![ vec![
String::from("-s"), String::from("-s"),
String::from(device), device,
String::from("mkpart"), String::from("mkpart"),
String::from("btrfs"), String::from("btrfs"),
String::from("300"), String::from("300"),
@ -117,7 +117,7 @@ fn partition_with_efi(device: &PathBuf) {
); );
} }
fn part_nvme(device: &PathBuf, efi: bool) { fn part_nvme(device: &Path, efi: bool) {
let device = device.to_string_lossy().to_string(); let device = device.to_string_lossy().to_string();
if efi { if efi {
exec_eval( exec_eval(
@ -220,7 +220,7 @@ fn part_nvme(device: &PathBuf, efi: bool) {
} }
} }
fn part_disk(device: &PathBuf, efi: bool) { fn part_disk(device: &Path, efi: bool) {
let device = device.to_string_lossy().to_string(); let device = device.to_string_lossy().to_string();
if efi { if efi {
exec_eval( exec_eval(

Loading…
Cancel
Save