Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/edit.rs')
| -rw-r--r-- | crates/syntax/src/ast/edit.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 9b30642fe4..b706d7f722 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -43,8 +43,14 @@ impl ops::Add<u8> for IndentLevel { } } +impl ops::AddAssign<u8> for IndentLevel { + fn add_assign(&mut self, rhs: u8) { + self.0 += rhs; + } +} + impl IndentLevel { - pub fn single() -> IndentLevel { + pub fn zero() -> IndentLevel { IndentLevel(0) } pub fn is_zero(&self) -> bool { |