dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 07c716210dbd0151048f3ceaacf3d41b32934807
parent 5c251b8c634ea0d9fc8d50ec52dd7d46deb864f9
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Thu, 10 Aug 2023 13:01:38 +0200

mlm: small change in rust code

Diffstat:
Mscripts/mlm | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mlm b/scripts/mlm @@ -90,14 +90,14 @@ use std::path::PathBuf; use std::fs::File; use std::io::{BufReader, BufRead}; fn main() { - let args: Vec<String> = std::env::args().collect(); let music_dir = match std::env::var("MUSIC_DIR") { Ok(v) => PathBuf::from(v), _ => panic!("Variable MUSIC_DIR not set in environment."), }; assert!(music_dir.as_path().is_dir()); - let m3u_file_name = args.iter().skip(1).next().expect("No file provided"); + let args = std::env::args(); + let m3u_file_name = args.skip(1).next().expect("No file provided"); let m3u_file = File::open(m3u_file_name).expect("Couldn't read file"); let reader = BufReader::new(m3u_file); let mut linenum = 1;