Implement display for Pos

This commit is contained in:
ConnorSkees 2020-01-06 18:26:32 -05:00
parent 26ae7f38b4
commit 5688e03b8a

View File

@ -677,3 +677,9 @@ impl Pos {
self.column += num;
}
}
impl Display for Pos {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "line:{} col:{}", self.line, self.column)
}
}