tidy up indentation
This commit is contained in:
parent
eaa2745d4b
commit
0048290868
|
@ -252,14 +252,13 @@ fn torrent_search(
|
||||||
let stmt_str = format!("select * from torrents where name like '%' || ?1 || '%' order by {} {} limit ?2, ?3", sort_key, sort_dir);
|
let stmt_str = format!("select * from torrents where name like '%' || ?1 || '%' order by {} {} limit ?2, ?3", sort_key, sort_dir);
|
||||||
let mut stmt = conn.prepare(&stmt_str)?;
|
let mut stmt = conn.prepare(&stmt_str)?;
|
||||||
|
|
||||||
let torrent_iter = stmt.query_map(params!{
|
let torrent_iter = stmt.query_map(
|
||||||
|
params!{
|
||||||
query.replace(" ", "%"),
|
query.replace(" ", "%"),
|
||||||
offset.to_string(),
|
offset.to_string(),
|
||||||
size.to_string(),
|
size.to_string(),
|
||||||
},
|
},
|
||||||
|row| {
|
|row| {
|
||||||
let size: isize = row.get(2)?;
|
|
||||||
println!("got size {:?}", size);
|
|
||||||
Ok(Torrent {
|
Ok(Torrent {
|
||||||
infohash: row.get(0)?,
|
infohash: row.get(0)?,
|
||||||
name: row.get(1)?,
|
name: row.get(1)?,
|
||||||
|
|
Loading…
Reference in New Issue