diff options
author | tilpner | 2020-05-29 12:41:05 +0200 |
---|---|---|
committer | tilpner | 2020-05-29 12:41:05 +0200 |
commit | 7fa98e20655493e74b3ba95160dacd71f430e467 (patch) | |
tree | dd152c4b7351fc67b1ab81dd9c39c155abc7e318 /src/query | |
parent | 23e93564ca7de185aacab4c494312d8b732922dd (diff) | |
download | github-label-feed-7fa98e20655493e74b3ba95160dacd71f430e467.tar.gz github-label-feed-7fa98e20655493e74b3ba95160dacd71f430e467.tar.xz github-label-feed-7fa98e20655493e74b3ba95160dacd71f430e467.zip |
atom: optimise state filtering
Diffstat (limited to 'src/query')
-rw-r--r-- | src/query/issues.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/query/issues.rs b/src/query/issues.rs index 525ebe5..7221858 100644 --- a/src/query/issues.rs +++ b/src/query/issues.rs @@ -25,17 +25,17 @@ pub use issues_query::IssueState; impl IssueState { pub fn from_integer(i: i64) -> Option<Self> { match i { - 0 => Some(Self::OPEN), - 1 => Some(Self::CLOSED), + 1 => Some(Self::OPEN), + 2 => Some(Self::CLOSED), _ => None } } pub fn to_integer(&self) -> i64 { match self { - Self::OPEN => 0, - Self::CLOSED => 1, - Self::Other(_) => 2 + Self::OPEN => 1, + Self::CLOSED => 2, + Self::Other(_) => 0 } } |