From 10ced786e786653010966fdb94e77f2932afa319 Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Thu, 12 Dec 2024 14:24:57 +0100 Subject: [PATCH] format --- crates/uv/src/commands/pip/list.rs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/crates/uv/src/commands/pip/list.rs b/crates/uv/src/commands/pip/list.rs index 097863c71..ccdadd967 100644 --- a/crates/uv/src/commands/pip/list.rs +++ b/crates/uv/src/commands/pip/list.rs @@ -159,7 +159,13 @@ pub(crate) async fn pip_list( .copied() .map(|dist| { let location = if verbose && dist.path().parent().is_some() { - Some(dist.path().parent().unwrap().simplified_display().to_string()) + Some( + dist.path() + .parent() + .unwrap() + .simplified_display() + .to_string(), + ) } else { None }; @@ -188,9 +194,9 @@ pub(crate) async fn pip_list( .get(dist.name()) .and_then(|filename| filename.as_ref()) .map(FileType::from), - editable_project_location: dist - .as_editable() - .map(|url| url.to_file_path().unwrap().simplified_display().to_string()), + editable_project_location: dist.as_editable().map(|url| { + url.to_file_path().unwrap().simplified_display().to_string() + }), } }) .collect_vec(); @@ -275,7 +281,11 @@ pub(crate) async fn pip_list( .iter() .map(|dist| { if dist.path().parent().is_some() { - dist.path().parent().unwrap().simplified_display().to_string() + dist.path() + .parent() + .unwrap() + .simplified_display() + .to_string() } else { String::new() } @@ -284,10 +294,7 @@ pub(crate) async fn pip_list( }); columns.push(Column { header: String::from("Installer"), - rows: results - .iter() - .map(|_| "uv".to_string()) - .collect_vec(), + rows: results.iter().map(|_| "uv".to_string()).collect_vec(), }); }