Formatting

This commit is contained in:
Antoine Gersant 2016-12-21 07:05:16 +01:00
parent 6044fbb029
commit f9a27895b4
14 changed files with 1457 additions and 1454 deletions

2
.rustfmt.toml Normal file
View file

@ -0,0 +1,2 @@
write_mode = "Overwrite"
hard_tabs = true

View file

@ -589,7 +589,8 @@ impl Index {
pub fn get_random_albums(&self, count: u32) -> Result<Vec<Directory>> {
let db = self.connect()?;
let mut select =
db.prepare("SELECT path, artwork, year, artist, album FROM directories WHERE album IS NOT NULL ORDER BY RANDOM() LIMIT ?")?;
db.prepare("SELECT path, artwork, year, artist, album FROM directories WHERE album \
IS NOT NULL ORDER BY RANDOM() LIMIT ?")?;
select.bind(1, &Value::Integer(count as i64))?;
self.select_directories(&mut select)
}