mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 23:35:26 +00:00
Add support for deserializing &str
s
This commit is contained in:
parent
eef1587b84
commit
be825b8629
@ -31,6 +31,10 @@ pub trait Visitor<D: Deserializer<E>, R, E> {
|
|||||||
Err(d.syntax_error())
|
Err(d.syntax_error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn visit_str(&mut self, d: &mut D, v: &str) -> Result<R, E> {
|
||||||
|
self.visit_string(d, v.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn visit_string(&mut self, d: &mut D, _v: String) -> Result<R, E> {
|
fn visit_string(&mut self, d: &mut D, _v: String) -> Result<R, E> {
|
||||||
Err(d.syntax_error())
|
Err(d.syntax_error())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user