diff options
Diffstat (limited to 'support/texlab/src/citation/output.rs')
-rw-r--r-- | support/texlab/src/citation/output.rs | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/support/texlab/src/citation/output.rs b/support/texlab/src/citation/output.rs index 555ec138db..2fc8a02361 100644 --- a/support/texlab/src/citation/output.rs +++ b/support/texlab/src/citation/output.rs @@ -26,31 +26,12 @@ impl Add for Punct { fn add(self, rhs: Self) -> Self::Output { match (self, rhs) { - (Self::Nothing, Self::Nothing) => Self::Nothing, - (Self::Nothing, Self::Space) - | (Self::Space, Self::Nothing) - | (Self::Space, Self::Space) => Self::Space, - (Self::Nothing, Self::Comma) - | (Self::Space, Self::Comma) - | (Self::Comma, Self::Nothing) - | (Self::Comma, Self::Space) - | (Self::Comma, Self::Comma) - | (Self::Comma, Self::Dot) - | (Self::Dot, Self::Comma) => Self::Comma, - (Self::Nothing, Self::Dot) - | (Self::Space, Self::Dot) - | (Self::Dot, Self::Nothing) - | (Self::Dot, Self::Space) - | (Self::Dot, Self::Dot) => Self::Dot, - (Self::Nothing, Self::Colon) - | (Self::Space, Self::Colon) - | (Self::Comma, Self::Colon) - | (Self::Dot, Self::Colon) - | (Self::Colon, Self::Nothing) - | (Self::Colon, Self::Space) - | (Self::Colon, Self::Comma) - | (Self::Colon, Self::Dot) - | (Self::Colon, Self::Colon) => Self::Colon, + (Self::Nothing, punct) | (punct, Self::Nothing) => punct, + (_, Self::Colon) | (Self::Colon, _) => Self::Colon, + (Self::Space, Self::Space) => Self::Space, + (Self::Space | Self::Comma | Self::Dot, Self::Comma) + | (Self::Comma, Self::Space | Self::Dot) => Self::Comma, + (Self::Space | Self::Dot, Self::Dot) | (Self::Dot, Self::Space) => Self::Dot, } } } |