Skip to content

Commit 061516f

Browse files
committed
Less code.
1 parent 147f06c commit 061516f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/loader/flattening/allocate_registers.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ impl Allocation {
168168

169169
pub fn get_as_reg(&self, input: &NodeInput) -> Result<Range<u32>, Error> {
170170
match input {
171-
NodeInput::Reference(origin) => self
172-
.nodes_outputs
173-
.get(origin)
174-
.cloned()
175-
.ok_or(Error::NotAllocated),
171+
NodeInput::Reference(origin) => self.get(origin),
176172
NodeInput::Constant(_) => {
177173
// Constants don't need register allocation
178174
Err(Error::NotARegister)

0 commit comments

Comments
 (0)