]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/cache.rs
Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister
[rust.git] / src / bootstrap / cache.rs
index fac5d8db5119df6da5c7b4ab1a06241e19eba326..97f0bfdc484da2ea6710e1689f83b6772081d12f 100644 (file)
@@ -270,7 +270,7 @@ pub fn get<S: Step>(&self, step: &S) -> Option<S::Output> {
 
 #[cfg(test)]
 impl Cache {
-    pub fn all<S: Ord + Copy + Step>(&mut self) -> Vec<(S, S::Output)> {
+    pub fn all<S: Ord + Clone + Step>(&mut self) -> Vec<(S, S::Output)> {
         let cache = self.0.get_mut();
         let type_id = TypeId::of::<S>();
         let mut v = cache
@@ -278,7 +278,7 @@ pub fn all<S: Ord + Copy + Step>(&mut self) -> Vec<(S, S::Output)> {
             .map(|b| b.downcast::<HashMap<S, S::Output>>().expect("correct type"))
             .map(|m| m.into_iter().collect::<Vec<_>>())
             .unwrap_or_default();
-        v.sort_by_key(|&(a, _)| a);
+        v.sort_by_key(|(s, _)| s.clone());
         v
     }