-
-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding rest of community sorts. Fixes #3374 #3376
Conversation
didn't know about this one |
@@ -183,12 +183,33 @@ impl<'a> CommunityQuery<'a> { | |||
} | |||
|
|||
match self.sort.unwrap_or(SortType::Hot) { | |||
SortType::Hot => query = query.order_by(community_aggregates::hot_rank.desc()), | |||
SortType::Active => query = query.order_by(community_aggregates::hot_rank.desc()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be easier to read if you put use SortType::*
before the match. Then you can do Hot | Active => ...
in cases where the same statement is used for multiple cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K done.
c276426
to
bf8110c
Compare
Clippy is complaining that you should move the use. |
No description provided.