From 0048290868510c492f4fc3269058b8dd3841c242 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Fri, 3 Jul 2020 12:45:12 +0200 Subject: [PATCH] tidy up indentation --- server/service/src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/service/src/main.rs b/server/service/src/main.rs index 4354977..bf312e3 100644 --- a/server/service/src/main.rs +++ b/server/service/src/main.rs @@ -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 mut stmt = conn.prepare(&stmt_str)?; - let torrent_iter = stmt.query_map(params!{ + let torrent_iter = stmt.query_map( + params!{ query.replace(" ", "%"), offset.to_string(), size.to_string(), - }, - |row| { - let size: isize = row.get(2)?; - println!("got size {:?}", size); + }, + |row| { Ok(Torrent { infohash: row.get(0)?, name: row.get(1)?,