caio.co/de/cantine

Define ENCODED_SEARCH_CURSOR_LEN as 32 directly

Id
f38925b746285816ff2e37b4d47271d37ebb2846
Author
Caio
Commit time
2019-12-30T13:30:12+01:00

Modified cantine/src/model.rs

@@ -183,8 +183,7
}
}

-// XXX Only valid because I know the result is multiple of 4
-const ENCODED_SEARCH_CURSOR_LEN: usize = SearchCursor::SIZE * 8 / 6;
+const ENCODED_SEARCH_CURSOR_LEN: usize = 32;

impl Serialize for SearchCursor {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>