Skip to content

Commit 8cd9b0c

Browse files
committed
remove dead code
1 parent 097dbdf commit 8cd9b0c

File tree

3 files changed

+2
-49
lines changed

3 files changed

+2
-49
lines changed

src/cargo/core/resolver/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::util::CargoResult;
1313
use crate::util::Graph;
1414

1515
use super::errors::ActivateResult;
16-
use super::types::{ConflictMap, ConflictReason, DepInfo, GraphNode, Method, RegistryQueryer};
16+
use super::types::{ConflictMap, ConflictReason, DepInfo, Method, RegistryQueryer};
1717

1818
pub use super::encode::{EncodableDependency, EncodablePackageId, EncodableResolve};
1919
pub use super::encode::{Metadata, WorkspaceResolve};

src/cargo/core/resolver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use crate::util::errors::CargoResult;
6262
use crate::util::profile;
6363

6464
use self::context::{Activations, Context};
65-
use self::types::{Candidate, ConflictMap, ConflictReason, DepsFrame, GraphNode};
65+
use self::types::{Candidate, ConflictMap, ConflictReason, DepsFrame};
6666
use self::types::{RcVecIter, RegistryQueryer, RemainingDeps, ResolverProgress};
6767

6868
pub use self::encode::{EncodableDependency, EncodablePackageId, EncodableResolve};

src/cargo/core/resolver/types.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -491,50 +491,3 @@ where
491491
}
492492

493493
impl<T: Clone> ExactSizeIterator for RcVecIter<T> {}
494-
495-
pub struct RcList<T> {
496-
pub head: Option<Rc<(T, RcList<T>)>>,
497-
}
498-
499-
impl<T> RcList<T> {
500-
pub fn new() -> RcList<T> {
501-
RcList { head: None }
502-
}
503-
504-
pub fn push(&mut self, data: T) {
505-
let node = Rc::new((
506-
data,
507-
RcList {
508-
head: self.head.take(),
509-
},
510-
));
511-
self.head = Some(node);
512-
}
513-
}
514-
515-
// Not derived to avoid `T: Clone`
516-
impl<T> Clone for RcList<T> {
517-
fn clone(&self) -> RcList<T> {
518-
RcList {
519-
head: self.head.clone(),
520-
}
521-
}
522-
}
523-
524-
// Avoid stack overflows on drop by turning recursion into a loop
525-
impl<T> Drop for RcList<T> {
526-
fn drop(&mut self) {
527-
let mut cur = self.head.take();
528-
while let Some(head) = cur {
529-
match Rc::try_unwrap(head) {
530-
Ok((_data, mut next)) => cur = next.head.take(),
531-
Err(_) => break,
532-
}
533-
}
534-
}
535-
}
536-
537-
pub enum GraphNode {
538-
Add(PackageId),
539-
Link(PackageId, PackageId, Dependency),
540-
}

0 commit comments

Comments
 (0)