diff options
| author | homunkulus <homunkulus@gmx.com> | 2017-12-23 10:36:08 +0000 |
|---|---|---|
| committer | homunkulus <homunkulus@gmx.com> | 2017-12-23 10:36:08 +0000 |
| commit | 8a396c51f2caaeca7ee0f81ef2f3c4f2f73d8df1 (patch) | |
| tree | fa6538343f2d524be574285c2bb68057edc11420 /macros/src/analyze.rs | |
| parent | 0f5784c2401d4b12004f34345e721598fa21219a (diff) | |
| parent | a238fd5dc783f57f8fa61795690e6069b1becd32 (diff) | |
Auto merge of #58 - japaric:init-resources, r=japaric
safe `&'static mut` references via init.resources
see RFC #59 for details
Diffstat (limited to 'macros/src/analyze.rs')
| -rw-r--r-- | macros/src/analyze.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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, |
