Avoid needless consumption
This commit is contained in:
@@ -81,7 +81,7 @@ struct ChrootCommand {
|
|||||||
block_device: PathBuf,
|
block_device: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fix_fstab(fstab: String) -> String {
|
fn fix_fstab(fstab: &str) -> String {
|
||||||
fstab
|
fstab
|
||||||
.lines()
|
.lines()
|
||||||
.filter(|line| !line.contains("swap") && !line.starts_with('#'))
|
.filter(|line| !line.contains("swap") && !line.starts_with('#'))
|
||||||
@@ -156,7 +156,7 @@ fn create(command: CreateCommand) -> Result<(), Error> {
|
|||||||
.run(ErrorKind::Pacstrap)?;
|
.run(ErrorKind::Pacstrap)?;
|
||||||
|
|
||||||
let fstab = fix_fstab(
|
let fstab = fix_fstab(
|
||||||
genfstab
|
&genfstab
|
||||||
.execute()
|
.execute()
|
||||||
.arg("-U")
|
.arg("-U")
|
||||||
.arg(mount_point.path())
|
.arg(mount_point.path())
|
||||||
|
|||||||
Reference in New Issue
Block a user