aboutsummaryrefslogtreecommitdiff
path: root/src/query
diff options
context:
space:
mode:
authortilpner2020-05-29 12:41:05 +0200
committertilpner2020-05-29 12:41:05 +0200
commit7fa98e20655493e74b3ba95160dacd71f430e467 (patch)
treedd152c4b7351fc67b1ab81dd9c39c155abc7e318 /src/query
parent23e93564ca7de185aacab4c494312d8b732922dd (diff)
downloadgithub-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.rs10
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
}
}