Allow converting from Variable to OptVariable

This commit is contained in:
Richard Feldman 2020-01-01 16:52:57 -05:00
parent 8d4c095ccb
commit 452e59c7a3

View file

@ -129,6 +129,12 @@ impl Variable {
const FIRST_USER_SPACE_VAR: Variable = Variable(1);
}
impl Into<OptVariable> for Variable {
fn into(self) -> OptVariable {
OptVariable(self.0)
}
}
impl fmt::Debug for Variable {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)