mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-17 23:24:46 +00:00
style: apply cargo fmt
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4a6a5fc4e3
commit
40a9a3bbd5
1 changed files with 17 additions and 15 deletions
|
|
@ -267,22 +267,24 @@ impl Db {
|
|||
/// thumbnail_blob -- callers only need the original payload.
|
||||
pub fn get_raw_item(&self, id: &str) -> Result<Option<RawItem>> {
|
||||
let conn = lock_conn(&self.conn);
|
||||
let result = conn.query_row(
|
||||
"SELECT id, mime_type, content_text, content_blob, source_app, created_at
|
||||
let result = conn
|
||||
.query_row(
|
||||
"SELECT id, mime_type, content_text, content_blob, source_app, created_at
|
||||
FROM clipboard_history WHERE id = ?1",
|
||||
params![id],
|
||||
|row| {
|
||||
Ok(RawItem {
|
||||
id: row.get(0)?,
|
||||
mime_type: row.get(1)?,
|
||||
content_text: row.get(2)?,
|
||||
content_blob: row.get(3)?,
|
||||
thumbnail_blob: None,
|
||||
source_app: row.get(4)?,
|
||||
created_at: row.get(5)?,
|
||||
})
|
||||
},
|
||||
).ok();
|
||||
params![id],
|
||||
|row| {
|
||||
Ok(RawItem {
|
||||
id: row.get(0)?,
|
||||
mime_type: row.get(1)?,
|
||||
content_text: row.get(2)?,
|
||||
content_blob: row.get(3)?,
|
||||
thumbnail_blob: None,
|
||||
source_app: row.get(4)?,
|
||||
created_at: row.get(5)?,
|
||||
})
|
||||
},
|
||||
)
|
||||
.ok();
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue