Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
use core::{error::Error, fmt};
/// Error of parsing an enum value its string representation.
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub struct FromStrError {
type_name: &'static str,
}
impl FromStrError {
#[doc(hidden)]
#[must_use]
#[inline]
pub const fn new(type_name: &'static str) -> Self {
Self { type_name }
}
}
impl fmt::Display for FromStrError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Invalid `{}` string representation", self.type_name)
}
}
impl Error for FromStrError {}