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?
i.e. instead of:
if
set_sortreturned theQueryit could be:Also, shouldn't it take
&mut selfrather than just&self? I realise since it's unsafe/ffi it doesn't need to, but semantically?