sxyazi/yazi · error · anyhow::Error
not an integer
Error message
not an integer
What it means
Error "not an integer" thrown in sxyazi/yazi.
Source
Thrown at yazi-shared/src/data/macros.rs:46
macro_rules! impl_into_integer {
($a:ty, $($b:ty),+ $(,)?) => {
impl_into_integer!(@impl ref $a, $a, $($b),+);
impl_into_integer!(@impl owned $a, &$a, $($b),+);
};
(@impl $kind:ident $t:ty, $a:ty, $($b:ty),+ $(,)?) => {
$(
impl TryFrom<$a> for $b {
type Error = anyhow::Error;
fn try_from(value: $a) -> Result<Self, Self::Error> {
paste::paste! {
Ok(match ref_or_owned!($kind, value) {
$t::Integer(i) => <$b>::try_from(*i)?,
$t::Number(n) => <$b>::try_from($crate::data::macros::float_to_i64(*n)?)?,
$t::String(s) => s.parse()?,
$t::Id(i) => <$b>::try_from(i.get())?,
_ => anyhow::bail!("not an integer"),
})
}
}
}
)+
};
}
macro_rules! impl_into_number {
($a:ty, $($b:ty),+ $(,)?) => {
impl_into_number!(@impl ref $a, $a, $($b),+);
impl_into_number!(@impl owned $a, &$a, $($b),+);
};
(@impl $kind:ident $t:ty, $a:ty, $($b:ty),+ $(,)?) => {
$(
impl TryFrom<$a> for $b {
type Error = anyhow::Error;
View on GitHub (pinned to 94abcfa92f)
When it happens
Trigger: Thrown at yazi-shared/src/data/macros.rs:46 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sxyazi/yazi@94abcfa92f (2026-08-16).
Data as JSON: /api/errors/b35c926447651cf7.
Report an issue: GitHub.