diff options
| author | Marcus Klaas <mail@marcusklaas.nl> | 2015-10-24 12:19:58 +0200 |
|---|---|---|
| committer | Marcus Klaas <mail@marcusklaas.nl> | 2015-10-24 13:13:15 +0200 |
| commit | d122ad5adc2164e34e59a7e9e7e8da2dfba7ffb5 (patch) | |
| tree | 47c808713a466de490677005fa422f27a0260164 /src/lib.rs | |
| parent | 58ff0d8730806332e05b34189d91c8504f71eccc (diff) | |
Address some issues with multiline patterns in let statements
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs index 33753524348..a22e797fb68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -168,6 +168,14 @@ impl Add<usize> for Indent { } } +impl Sub<usize> for Indent { + type Output = Indent; + + fn sub(self, rhs: usize) -> Indent { + Indent::new(self.block_indent, self.alignment - rhs) + } +} + #[derive(Copy, Clone)] pub enum WriteMode { // Backups the original file and overwrites the orignal. |
