Fixing split.

This commit is contained in:
Dessalines 2025-01-10 12:26:39 -05:00
parent 46bbf2f124
commit 4b71bc6701

View file

@ -101,7 +101,7 @@ impl ModlogCombinedPaginationCursor {
let mut query = modlog_combined::table
.select(ModlogCombined::as_select())
.into_boxed();
let (prefix, id_str) = self.0.split_first('-').ok_or_else(err_msg)?;
let (prefix, id_str) = self.0.split_once('-').ok_or_else(err_msg)?;
let id = i32::from_str_radix(id_str, 16).map_err(|_err| err_msg())?;
query = match prefix {
"AdminAllowInstance" => query.filter(modlog_combined::admin_allow_instance_id.eq(id)),