@@ -59,13 +59,7 @@ pub(crate) async fn list(
59
59
. flatten ( ) ;
60
60
61
61
for download in downloads {
62
- output. insert ( (
63
- download. python_version ( ) . version ( ) . clone ( ) ,
64
- download. os ( ) . to_string ( ) ,
65
- download. key ( ) . clone ( ) ,
66
- Kind :: Download ,
67
- None ,
68
- ) ) ;
62
+ output. insert ( ( download. key ( ) . clone ( ) , Kind :: Download , None ) ) ;
69
63
}
70
64
} ;
71
65
@@ -94,9 +88,7 @@ pub(crate) async fn list(
94
88
Kind :: System
95
89
} ;
96
90
output. insert ( (
97
- installation. python_version ( ) . clone ( ) ,
98
- installation. os ( ) . to_string ( ) ,
99
- installation. key ( ) . clone ( ) ,
91
+ installation. key ( ) ,
100
92
kind,
101
93
Some ( installation. interpreter ( ) . sys_executable ( ) . to_path_buf ( ) ) ,
102
94
) ) ;
@@ -106,7 +98,7 @@ pub(crate) async fn list(
106
98
let mut seen_patch = FxHashSet :: default ( ) ;
107
99
let mut seen_paths = FxHashSet :: default ( ) ;
108
100
let mut include = Vec :: new ( ) ;
109
- for ( version , os , key, kind, path) in output. iter ( ) . rev ( ) {
101
+ for ( key, kind, path) in output. iter ( ) . rev ( ) {
110
102
// Do not show the same path more than once
111
103
if let Some ( path) = path {
112
104
if !seen_paths. insert ( path) {
@@ -116,9 +108,9 @@ pub(crate) async fn list(
116
108
117
109
// Only show the latest patch version for each download unless all were requested
118
110
if !matches ! ( kind, Kind :: System ) {
119
- if let [ major, minor, ..] = version. release ( ) {
111
+ if let [ major, minor, ..] = key . version ( ) . release ( ) {
120
112
if !seen_minor. insert ( (
121
- os . clone ( ) ,
113
+ * key . os ( ) ,
122
114
* major,
123
115
* minor,
124
116
key. implementation ( ) ,
@@ -130,9 +122,9 @@ pub(crate) async fn list(
130
122
}
131
123
}
132
124
}
133
- if let [ major, minor, patch] = version. release ( ) {
125
+ if let [ major, minor, patch] = key . version ( ) . release ( ) {
134
126
if !seen_patch. insert ( (
135
- os . clone ( ) ,
127
+ * key . os ( ) ,
136
128
* major,
137
129
* minor,
138
130
* patch,
0 commit comments