From fd482d0e20f2cadad045104711083d9dff8ea93e Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 21 Sep 2021 14:09:19 +0200 Subject: [PATCH] Make it possible to see if the monotonic's priority is set or default --- src/ast.rs | 2 +- src/parse.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 29d1004..c9c755f 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -211,7 +211,7 @@ pub struct MonotonicArgs { pub binds: Ident, /// The priority of this monotonic - pub priority: u8, + pub priority: Option, /// If this is the default monotonic pub default: bool, diff --git a/src/parse.rs b/src/parse.rs index 09e6433..08ad6cb 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -470,7 +470,6 @@ fn monotonic_args(tokens: TokenStream2) -> parse::Result { "`binds = ...` is missing", )); }; - let priority = priority.unwrap_or(1); let default = default.unwrap_or(false); Ok(MonotonicArgs {