This commit is contained in:
Greg Johnston 2023-06-25 13:31:48 -04:00
parent 5bb7122b93
commit 921bb616b4
1 changed files with 1 additions and 4 deletions

View File

@ -43,10 +43,7 @@ pub async fn get_todos(cx: Scope) -> Result<Vec<Todo>, ServerFnError> {
let mut todos = Vec::new();
let mut rows =
sqlx::query_as::<_, Todo>("SELECT * FROM todos").fetch(&mut conn);
while let Some(row) = rows
.try_next()
.await?
{
while let Some(row) = rows.try_next().await? {
todos.push(row);
}