Project
compiler
Describe the feature
Right now the macros unwrap_left and unwrap_right require you to specify the type of the Either branch that you're not using. For example, if you unwrap_right an unconfidential Amount1's Some object, you have to specify the type of the confidential amount that you don't expect as output, like
let amt: u64 = unwrap_right::<(u1, u256)>(amt1);
Could we make unwrap_left and unwrap_right figure out these types automatically rather than specifying them? E.g. just left amt: u64 = unwrap_right(amt1) without needing to say what the Left object would have been if it had been present, since we're also asserting that it's not present?
Project
compiler
Describe the feature
Right now the macros
unwrap_leftandunwrap_rightrequire you to specify the type of theEitherbranch that you're not using. For example, if youunwrap_rightan unconfidentialAmount1'sSomeobject, you have to specify the type of the confidential amount that you don't expect as output, likelet amt: u64 = unwrap_right::<(u1, u256)>(amt1);Could we make
unwrap_leftandunwrap_rightfigure out these types automatically rather than specifying them? E.g. justleft amt: u64 = unwrap_right(amt1)without needing to say what theLeftobject would have been if it had been present, since we're also asserting that it's not present?