Skip to content

remove PersistenceState from TreeCtx #19352

@mattsse

Description

@mattsse

Describe the feature

After recent improvements this is unused:

/// Information about the current persistence state
persistence: &'a PersistenceState,

and can be removed together with these functions:

/// Returns a reference to the persistence info
pub const fn persistence(&self) -> &PersistenceState {
self.persistence
}

pub fn persisting_kind_for(&self, block: BlockWithParent) -> PersistingKind {

we can further remove this type:

/// Whether or not the blocks are currently persisting and the input block is a descendant.
#[derive(Debug, Clone, Copy)]
pub enum PersistingKind {
/// The blocks are not currently persisting.
NotPersisting,
/// The blocks are currently persisting but the input block is not a descendant.
PersistingNotDescendant,
/// The blocks are currently persisting and the input block is a descendant.
PersistingDescendant,
}

Additional context

No response

Metadata

Metadata

Assignees

Labels

C-debtA clean up/refactor of existing codeC-enhancementNew feature or requestD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions