mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix: improve parity statediff (#5037)
This commit is contained in:
@@ -85,6 +85,11 @@ pub enum Delta<T> {
|
||||
// === impl Delta ===
|
||||
|
||||
impl<T> Delta<T> {
|
||||
/// Creates a new [Delta::Changed] variant
|
||||
pub fn changed(from: T, to: T) -> Self {
|
||||
Self::Changed(ChangedType { from, to })
|
||||
}
|
||||
|
||||
/// Returns true if the value is unchanged
|
||||
pub fn is_unchanged(&self) -> bool {
|
||||
matches!(self, Delta::Unchanged)
|
||||
|
||||
Reference in New Issue
Block a user