mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
fix the field distribution when upgrading from the v1_12
This commit is contained in:
parent
cfc1e193b6
commit
20ac59c946
5 changed files with 59 additions and 13 deletions
|
@ -89,19 +89,24 @@ impl<Name: NamedStep> Step for AtomicSubStep<Name> {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use convert_case as _private_convert_case;
|
||||
#[doc(hidden)]
|
||||
pub use enum_iterator as _private_enum_iterator;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! make_enum_progress {
|
||||
($visibility:vis enum $name:ident { $($variant:ident,)+ }) => {
|
||||
#[repr(u8)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Sequence)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, $crate::progress::_private_enum_iterator::Sequence)]
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
$visibility enum $name {
|
||||
$($variant),+
|
||||
}
|
||||
|
||||
impl Step for $name {
|
||||
fn name(&self) -> Cow<'static, str> {
|
||||
use convert_case::Casing;
|
||||
impl $crate::progress::Step for $name {
|
||||
fn name(&self) -> std::borrow::Cow<'static, str> {
|
||||
use $crate::progress::_private_convert_case::Casing;
|
||||
|
||||
match self {
|
||||
$(
|
||||
|
@ -115,6 +120,7 @@ macro_rules! make_enum_progress {
|
|||
}
|
||||
|
||||
fn total(&self) -> u32 {
|
||||
use $crate::progress::_private_enum_iterator::Sequence;
|
||||
Self::CARDINALITY as u32
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue