Code cleanup

This commit is contained in:
2024-02-22 12:44:02 +03:00
parent 8979cc5b25
commit b526eb0c12
18 changed files with 124 additions and 148 deletions

View File

@ -39,7 +39,7 @@ impl Account {
/// Streams the names of the user accounts
#[inline]
pub fn get_names(user_id: u64, pool: &Pool) -> impl Stream<Item = crate::Result<String>> + '_ {
query_as::<_, (String,)>("SELECT name FROM account WHERE user_id = ?")
query_as::<_, (String,)>("SELECT name FROM account WHERE user_id = ? ORDER BY name")
.bind(user_id)
.fetch(pool)
.map_ok(|(name,)| name)