fix: type Cub AUR out-of-date visitor
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -49,38 +49,38 @@ fn deserialize_out_of_date<'de, D>(deserializer: D) -> Result<Option<bool>, D::E
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
use serde::de;
|
||||
use serde::de::{self, Visitor};
|
||||
|
||||
struct OutOfDateVisitor;
|
||||
|
||||
impl<'de> de::Visitor<'de> for OutOfDateVisitor {
|
||||
impl<'de> Visitor<'de> for OutOfDateVisitor {
|
||||
type Value = Option<bool>;
|
||||
|
||||
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
formatter.write_str("null, boolean, or integer")
|
||||
}
|
||||
|
||||
fn visit_none(self) -> Result<Self::Value, de::Error> {
|
||||
fn visit_none<E: de::Error>(self) -> Result<Self::Value, E> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn visit_unit(self) -> Result<Self::Value, de::Error> {
|
||||
fn visit_unit<E: de::Error>(self) -> Result<Self::Value, E> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn visit_bool(self, v: bool) -> Result<Self::Value, de::Error> {
|
||||
fn visit_bool<E: de::Error>(self, v: bool) -> Result<Self::Value, E> {
|
||||
Ok(Some(v))
|
||||
}
|
||||
|
||||
fn visit_i64(self, v: i64) -> Result<Self::Value, de::Error> {
|
||||
fn visit_i64<E: de::Error>(self, v: i64) -> Result<Self::Value, E> {
|
||||
Ok(Some(v != 0))
|
||||
}
|
||||
|
||||
fn visit_u64(self, v: u64) -> Result<Self::Value, de::Error> {
|
||||
fn visit_u64<E: de::Error>(self, v: u64) -> Result<Self::Value, E> {
|
||||
Ok(Some(v != 0))
|
||||
}
|
||||
|
||||
fn visit_f64(self, v: f64) -> Result<Self::Value, de::Error> {
|
||||
fn visit_f64<E: de::Error>(self, v: f64) -> Result<Self::Value, E> {
|
||||
Ok(Some(v != 0.0))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user