mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Allow converting from Variable to OptVariable
This commit is contained in:
parent
8d4c095ccb
commit
452e59c7a3
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue