diff --git a/rupring/src/request.rs b/rupring/src/request.rs index bf32f5a..81766c9 100644 --- a/rupring/src/request.rs +++ b/rupring/src/request.rs @@ -195,6 +195,30 @@ impl QueryStringDeserializer for QueryString { } } +impl QueryStringDeserializer for QueryString { + type Error = (); + + fn deserialize(&self) -> Result { + if let Some(e) = self.0.get(0) { + e.parse::().map_err(|_| ()) + } else { + Err(()) + } + } +} + +impl QueryStringDeserializer for QueryString { + type Error = (); + + fn deserialize(&self) -> Result { + if let Some(e) = self.0.get(0) { + e.parse::().map_err(|_| ()) + } else { + Err(()) + } + } +} + #[derive(Debug, Clone)] pub struct ParamString(pub String);