use fmt;
/// Error returned when an algorithm name cannot be resolved.
///
/// This is produced by [`Algorithm::from_name`](crate::Algorithm::from_name)
/// and [`Stemmer::try_from_name`](crate::Stemmer::try_from_name) when:
///
/// - the name is not a known Snowball algorithm id or alias, or
/// - it names an algorithm whose Cargo feature is **disabled** in this build
/// (so the variant is not compiled in).
///
/// # Example
///
/// ```
/// use frostem::Algorithm;
///
/// let err = Algorithm::from_name("not-a-lang").unwrap_err();
/// assert_eq!(err.name, "not-a-lang");
/// ```