[sq] rename derivation_node

This commit is contained in:
Berkus Decker 2020-12-03 02:31:30 +02:00
parent f796788ed5
commit 8e7e652a76
1 changed files with 4 additions and 4 deletions

View File

@ -457,7 +457,7 @@ impl CapNodeCapability {
(1usize << self.0.read(CapNodeCap::Radix)) * core::mem::size_of::<CapTableEntry>(); (1usize << self.0.read(CapNodeCap::Radix)) * core::mem::size_of::<CapTableEntry>();
let slice = unsafe { core::slice::from_raw_parts_mut(ptr as *mut CapTableEntry, size) }; let slice = unsafe { core::slice::from_raw_parts_mut(ptr as *mut CapTableEntry, size) };
slice[slot].capability = cap.as_u128(); slice[slot].capability = cap.as_u128();
slice[slot].derivation_node = DerivationTreeNode::empty() slice[slot].derivation = DerivationTreeNode::empty()
.set_revocable(true) .set_revocable(true)
.set_first_badged(true); .set_first_badged(true);
} }
@ -562,7 +562,7 @@ pub enum CapError {
#[derive(Clone)] #[derive(Clone)]
pub struct CapTableEntry { pub struct CapTableEntry {
capability: u128, capability: u128,
derivation_node: DerivationTreeNode, derivation: DerivationTreeNode,
} }
impl fmt::Debug for CapTableEntry { impl fmt::Debug for CapTableEntry {
@ -582,7 +582,7 @@ impl CapTableEntry {
fn empty() -> CapTableEntry { fn empty() -> CapTableEntry {
CapTableEntry { CapTableEntry {
capability: 0, capability: 0,
derivation_node: DerivationTreeNode::empty(), derivation: DerivationTreeNode::empty(),
} }
} }
} }
@ -681,7 +681,7 @@ mod tests {
fn first_capability_derivation_has_no_prev_link() { fn first_capability_derivation_has_no_prev_link() {
let entry = CapTableEntry::empty(); let entry = CapTableEntry::empty();
assert!(entry assert!(entry
.derivation_node .derivation
.try_get_prev() .try_get_prev()
.contains_err(&DerivationTreeError::InvalidPrev)); .contains_err(&DerivationTreeError::InvalidPrev));
} }