From 722bf73316b46cc206f09b06b705ea65efe89663 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 29 Jan 2018 23:37:30 +1100 Subject: [PATCH] Reformat installer --- src/installer.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/installer.rs b/src/installer.rs index caa8242..bc14949 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -67,12 +67,16 @@ impl InstallerFramework { let latest_result = results .into_iter() .filter(|f| f.files.iter().filter(|x| regex.is_match(&x.name)).count() > 0) - .max_by_key(|f| f.version.clone()).unwrap(); + .max_by_key(|f| f.version.clone()) + .unwrap(); // Find the matching file in here - let latest_file = latest_result.files.into_iter() + let latest_file = latest_result + .files + .into_iter() .filter(|x| regex.is_match(&x.name)) - .next().unwrap(); + .next() + .unwrap(); println!("{:?}", latest_file); }