mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
stylistic changes
This commit is contained in:
@@ -2258,9 +2258,9 @@ pub async fn get_chat_msgs(
|
|||||||
let process_rows = |rows: rusqlite::MappedRows<_>| {
|
let process_rows = |rows: rusqlite::MappedRows<_>| {
|
||||||
// It is faster to sort here rather than
|
// It is faster to sort here rather than
|
||||||
// let sqlite execute an ORDER BY clause.
|
// let sqlite execute an ORDER BY clause.
|
||||||
let mut sorted_rows = Vec::new();
|
let mut sorted_rows = Vec::<(i64, MsgId, bool)>::new();
|
||||||
for row in rows {
|
for row in rows {
|
||||||
let (ts, curr_id, exclude_message): (i64, MsgId, bool) = row?;
|
let (ts, curr_id, exclude_message) = row?;
|
||||||
sorted_rows.push((ts, curr_id, exclude_message));
|
sorted_rows.push((ts, curr_id, exclude_message));
|
||||||
}
|
}
|
||||||
sorted_rows.sort_unstable();
|
sorted_rows.sort_unstable();
|
||||||
@@ -2314,7 +2314,7 @@ pub async fn get_chat_msgs(
|
|||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.query_map(
|
.query_map(
|
||||||
"SELECT m.id as id, m.timestamp as timestamp
|
"SELECT m.id AS id, m.timestamp AS timestamp
|
||||||
FROM msgs m
|
FROM msgs m
|
||||||
WHERE m.chat_id=?
|
WHERE m.chat_id=?
|
||||||
AND m.hidden=0;",
|
AND m.hidden=0;",
|
||||||
|
|||||||
Reference in New Issue
Block a user