///
/// ## Example
///
- #[cfg_attr(feature = "alloc", doc = " ```")]
- #[cfg_attr(not(feature = "alloc"), doc = " ```rust,ignore")]
+ /// ```
+ /// # #[cfg(feature = "alloc")] {
/// use verhoeff::VerhoeffMut;
/// let mut digits = String::from("12345");
/// digits.push_verhoeff_check_digit();
/// assert_eq!(digits, "123451");
- #[doc = " ```"] // just to keep the Vim syntax highlighter happy. Silly, huh?
+ /// # }
+ /// ```
+ ///
+ /// Because this calls [`Verhoeff::calculate_verhoeff_check_digit`],
+ /// it will panic if the input is not comprised of appropriate digits.
fn push_verhoeff_check_digit(&mut self);
}
/// digits.push_verhoeff_check_digit();
/// assert_eq!(digits, [1, 2, 3, 4, 5, 1]);
/// ```
+ ///
+ /// Because this calls [`Verhoeff::calculate_verhoeff_check_digit`],
+ /// it will panic if the input is not comprised of appropriate digits.
fn push_verhoeff_check_digit(&mut self) {
self.push(self.calculate_verhoeff_check_digit());
}