From 9bb1b10d10cd2b1863c9e5f136621a845b0cb3c1 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 11 Jan 2019 11:59:02 -0800 Subject: WIP on annotations and editgroup accessors --- rust/src/entity_crud.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rust/src/entity_crud.rs') diff --git a/rust/src/entity_crud.rs b/rust/src/entity_crud.rs index 3d9b5165..e54973da 100644 --- a/rust/src/entity_crud.rs +++ b/rust/src/entity_crud.rs @@ -104,6 +104,7 @@ pub struct ExpandFlags { pub container: bool, pub releases: bool, pub creators: bool, + pub editors: bool, } impl FromStr for ExpandFlags { @@ -123,6 +124,7 @@ impl ExpandFlags { container: list.contains(&"container"), releases: list.contains(&"releases"), creators: list.contains(&"creators"), + editors: list.contains(&"editors"), } } pub fn none() -> ExpandFlags { @@ -133,6 +135,7 @@ impl ExpandFlags { container: false, releases: false, creators: false, + editors: false, } } } @@ -150,6 +153,7 @@ fn test_expand_flags() { "other_thing", "releases", "creators", + "editors", ]); assert!( all == ExpandFlags { @@ -159,6 +163,7 @@ fn test_expand_flags() { container: true, releases: true, creators: true + editors: true } ); assert!(ExpandFlags::from_str("").unwrap().files == false); @@ -176,6 +181,7 @@ fn test_expand_flags() { container: true, releases: true, creators: true + editors: true } ); } -- cgit v1.2.3