diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-07 20:00:21 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-07 20:00:21 +0100 |
| commit | 68503b9a07b00bce3f4d377bcfe945452de815ea (patch) | |
| tree | 3719ef491b993c59b619ca215963000f4847e78f /src/library/spacing.rs | |
| parent | 9730e785a885a4ab5fcc52ce705298654f82f9c2 (diff) | |
Redesigned template layout
Diffstat (limited to 'src/library/spacing.rs')
| -rw-r--r-- | src/library/spacing.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/spacing.rs b/src/library/spacing.rs index 0b555510..feadf7f3 100644 --- a/src/library/spacing.rs +++ b/src/library/spacing.rs @@ -31,6 +31,13 @@ pub enum SpacingKind { Fractional(Fractional), } +impl SpacingKind { + /// Whether this is fractional spacing. + pub fn is_fractional(self) -> bool { + matches!(self, Self::Fractional(_)) + } +} + castable! { SpacingKind, Expected: "linear or fractional", |
