1
Fork 0

Use a dedicated DepKind for the forever-red node.

This commit is contained in:
Camille GILLOT 2022-05-03 22:04:49 +02:00
parent c168fba268
commit e912c8dfe0
5 changed files with 23 additions and 6 deletions

View file

@ -85,8 +85,12 @@ impl FingerprintStyle {
/// Describe the different families of dependency nodes.
pub trait DepKind: Copy + fmt::Debug + Eq + Hash + Send + Encodable<FileEncoder> + 'static {
/// DepKind to use when incr. comp. is turned off.
const NULL: Self;
/// DepKind to use to create the initial forever-red node.
const RED: Self;
/// Implementation of `std::fmt::Debug` for `DepNode`.
fn debug_node(node: &DepNode<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result;