summaryrefslogtreecommitdiff
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/db.rs b/src/db.rs
index 9ffbfe5..8fd21b1 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -220,7 +220,7 @@ pub fn userlist_insert(
220 Ok(()) 220 Ok(())
221} 221}
222 222
223pub fn userlist_get_all_ids(config: Cfg, list_id: String) -> MLE<Vec<String>> { 223pub fn userlist_get_all_ids(config: Cfg, list_id: &str) -> MLE<Vec<String>> {
224 let data = format!("{}/data.db", config.data); 224 let data = format!("{}/data.db", config.data);
225 let connection = Connection::open(data).unwrap(); 225 let connection = Connection::open(data).unwrap();
226 226
@@ -329,7 +329,7 @@ pub fn userlist_get_current_version(config: Cfg, list_id: &str, mod_id: &str) ->
329pub fn userlist_get_all_current_version_ids( 329pub fn userlist_get_all_current_version_ids(
330 config: Cfg, 330 config: Cfg,
331 list_id: String, 331 list_id: String,
332) -> Result<Vec<String>, Box<dyn std::error::Error>> { 332) -> MLE<Vec<String>> {
333 let data = format!("{}/data.db", config.data); 333 let data = format!("{}/data.db", config.data);
334 let connection = Connection::open(data)?; 334 let connection = Connection::open(data)?;
335 335
@@ -343,10 +343,10 @@ pub fn userlist_get_all_current_version_ids(
343 } 343 }
344 344
345 if versions.is_empty() { 345 if versions.is_empty() {
346 return Err(Box::new(std::io::Error::new( 346 return Err(MLError::new(
347 ErrorKind::Other, 347 ErrorType::DBError,
348 "NO_MODS_ON_LIST", 348 "NO_MODS_ON_LIST",
349 ))); 349 ));
350 }; 350 };
351 351
352 Ok(versions) 352 Ok(versions)