mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
fix for review
This commit is contained in:
@ -22,14 +22,6 @@ impl IndexedPos {
|
||||
pub const fn max() -> IndexedPos {
|
||||
IndexedPos(u16::max_value())
|
||||
}
|
||||
|
||||
pub fn next(self) -> SResult<IndexedPos> {
|
||||
self.0.checked_add(1).map(IndexedPos).ok_or(Error::MaxFieldsLimitExceeded)
|
||||
}
|
||||
|
||||
pub fn prev(self) -> SResult<IndexedPos> {
|
||||
self.0.checked_sub(1).map(IndexedPos).ok_or(Error::MaxFieldsLimitExceeded)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u16> for IndexedPos {
|
||||
@ -44,7 +36,6 @@ impl Into<u16> for IndexedPos {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Copy, Clone, Default, PartialOrd, Ord, PartialEq, Eq, Hash)]
|
||||
pub struct FieldId(pub u16);
|
||||
|
||||
@ -64,10 +55,6 @@ impl FieldId {
|
||||
pub fn next(self) -> SResult<FieldId> {
|
||||
self.0.checked_add(1).map(FieldId).ok_or(Error::MaxFieldsLimitExceeded)
|
||||
}
|
||||
|
||||
pub fn prev(self) -> SResult<FieldId> {
|
||||
self.0.checked_sub(1).map(FieldId).ok_or(Error::MaxFieldsLimitExceeded)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u16> for FieldId {
|
||||
|
Reference in New Issue
Block a user