Skip to content

Commit

Permalink
do requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mFragaBA committed Jan 11, 2024
1 parent 041253c commit d0ca426
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/store/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,12 @@ impl Store {
self.db
.prepare(QUERY)
.map_err(StoreError::QueryError)?
.query_map([], |row| {
let row: i64 = row.get(0)?;
Ok(row)
})
.query_map([], |row| row.get(0))
.expect("no binding parameters used in query")
.map(|result| {
result
.map_err(StoreError::ColumnParsingError)
.map(|id: i64| AccountId::try_from(id as u64).expect("account id is not valid"))
.map(|id: i64| AccountId::try_from(id as u64).expect("account id is valid"))
})
.collect::<Result<Vec<AccountId>, _>>()
}
Expand Down

0 comments on commit d0ca426

Please sign in to comment.