Skip to content

Commit

Permalink
Forgot this so I was reminded when trying to deserialize Bullet
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Jan 11, 2025
1 parent 7e9e187 commit c130796
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion crates/uplc/src/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,26 @@ impl TryFrom<u8> for DefaultFunction {
v if v == DefaultFunction::ByteStringToInteger as u8 => {
Ok(DefaultFunction::ByteStringToInteger)
}

v if v == DefaultFunction::AndByteString as u8 => Ok(DefaultFunction::AndByteString),
v if v == DefaultFunction::OrByteString as u8 => Ok(DefaultFunction::OrByteString),
v if v == DefaultFunction::XorByteString as u8 => Ok(DefaultFunction::XorByteString),
v if v == DefaultFunction::ComplementByteString as u8 => {
Ok(DefaultFunction::ComplementByteString)
}
v if v == DefaultFunction::ReadBit as u8 => Ok(DefaultFunction::ReadBit),
v if v == DefaultFunction::WriteBits as u8 => Ok(DefaultFunction::WriteBits),
v if v == DefaultFunction::ReplicateByte as u8 => Ok(DefaultFunction::ReplicateByte),
v if v == DefaultFunction::ShiftByteString as u8 => {
Ok(DefaultFunction::ShiftByteString)
}
v if v == DefaultFunction::RotateByteString as u8 => {
Ok(DefaultFunction::RotateByteString)
}
v if v == DefaultFunction::CountSetBits as u8 => Ok(DefaultFunction::CountSetBits),
v if v == DefaultFunction::FindFirstSetBit as u8 => {
Ok(DefaultFunction::FindFirstSetBit)
}
v if v == DefaultFunction::Ripemd_160 as u8 => Ok(DefaultFunction::Ripemd_160),
_ => Err(de::Error::Message(format!(
"Default Function not found - {v}"
))),
Expand Down

0 comments on commit c130796

Please sign in to comment.