add wildcard branches for matches on enums

This commit is contained in:
FreezyLemon
2022-10-22 16:25:24 +02:00
committed by Josh Holmer
parent 022eaa28cf
commit 28c356dd98
21 changed files with 42 additions and 0 deletions

View File

@ -34,6 +34,8 @@ impl From<SwrDitherType> for Dither {
SWR_DITHER_NS_LOW_SHIBATA => Dither::NoiseShapingLowShibata,
SWR_DITHER_NS_HIGH_SHIBATA => Dither::NoiseShapingHighShibata,
SWR_DITHER_NB => Dither::None,
_ => unimplemented!(),
}
}
}

View File

@ -13,6 +13,8 @@ impl From<SwrEngine> for Engine {
SWR_ENGINE_SWR => Engine::Software,
SWR_ENGINE_SOXR => Engine::SoundExchange,
SWR_ENGINE_NB => Engine::Software,
_ => unimplemented!(),
}
}
}

View File

@ -14,6 +14,8 @@ impl From<SwrFilterType> for Filter {
SWR_FILTER_TYPE_CUBIC => Filter::Cubic,
SWR_FILTER_TYPE_BLACKMAN_NUTTALL => Filter::BlackmanNuttall,
SWR_FILTER_TYPE_KAISER => Filter::Kaiser,
_ => unimplemented!(),
}
}
}