From a6dd004113fcbc03ffacacc519d742ee84886c1d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 9 Dec 2017 14:43:29 +0100 Subject: implement the Resource trait for owned resources this unbreaks the "generics" example --- macros/src/analyze.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'macros/src/analyze.rs') diff --git a/macros/src/analyze.rs b/macros/src/analyze.rs index 0fc125d..65d98e6 100644 --- a/macros/src/analyze.rs +++ b/macros/src/analyze.rs @@ -17,6 +17,13 @@ pub enum Ownership { } impl Ownership { + pub fn ceiling(&self) -> u8 { + match *self { + Ownership::Owned { priority } => priority, + Ownership::Shared { ceiling } => ceiling, + } + } + pub fn is_owned(&self) -> bool { match *self { Ownership::Owned { .. } => true, -- cgit v1.2.3