mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 08:17:57 +00:00
Use slicing syntax instead of .as_slice()
This commit is contained in:
+2
-2
@@ -239,7 +239,7 @@ impl Serialize for String {
|
||||
fn visit<
|
||||
V: Visitor,
|
||||
>(&self, visitor: &mut V) -> Result<V::Value, V::Error> {
|
||||
self.as_slice().visit(visitor)
|
||||
(&self[]).visit(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ impl<
|
||||
fn visit<
|
||||
V: Visitor,
|
||||
>(&self, visitor: &mut V) -> Result<V::Value, V::Error> {
|
||||
self.as_slice().visit(visitor)
|
||||
(&self[]).visit(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user