Avoid needless consumption

This commit is contained in:
Roey Darwish Dror 2018-11-26 13:46:57 +02:00
parent 7b81e6b3cf
commit d672cf5663

View File

@ -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())