Skip to content
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

Query#set_sort could return self to allow chaining? #32

Open
OJFord opened this issue Jul 20, 2021 · 0 comments
Open

Query#set_sort could return self to allow chaining? #32

OJFord opened this issue Jul 20, 2021 · 0 comments

Comments

@OJFord
Copy link

OJFord commented Jul 20, 2021

i.e. instead of:

let query = db.create_query("tag:inbox");
query.set_sort(Sort::NewestFirst);
let result = query.search_messages();

if set_sort returned the Query it could be:

let query = db
    .create_query("tag:inbox")
    .set_sort(Sort::NewestFirst)
    .search_messages();

Also, shouldn't it take &mut self rather than just &self? I realise since it's unsafe/ffi it doesn't need to, but semantically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant