diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-07 20:53:59 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-07 20:53:59 -0500 |
commit | 35b5b8956f0bdf81da25380de7d3a6f243e6d1c0 (patch) | |
tree | 1c7fac20e52ee30669670283e1633914590b85db /src/db.rs | |
parent | 544b316bbaa36448b3272c4e00cd21c07fe0971d (diff) | |
download | lastfm-query-35b5b8956f0bdf81da25380de7d3a6f243e6d1c0.tar.gz lastfm-query-35b5b8956f0bdf81da25380de7d3a6f243e6d1c0.zip |
combine exporter and cmd/sync
Diffstat (limited to 'src/db.rs')
-rw-r--r-- | src/db.rs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -74,10 +74,9 @@ impl DB { })?) } - pub fn insert_tracks<F: FnMut(lastfm::Track)>( + pub fn insert_tracks( &self, tracks: impl Iterator<Item=lastfm::Track>, - mut f: F ) -> failure::Fallible<()> { let mut sth = self.conn.prepare("INSERT INTO tracks VALUES (?, ?, ?, ?)")?; for track in tracks { @@ -88,7 +87,6 @@ impl DB { &track.name, &track.timestamp, ]).map(|_| ())?; - f(track); } Ok(()) } |