mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-26 13:29:53 +00:00
Fix build on 1.5.0 which does not have Vec::as_slice
This commit is contained in:
1 parent
bd40830905
commit
45c51d3198
1 file changed
+4
-4
@@ -138,11 +138,11 @@ impl ContainerAttrs {
|
||||
}
|
||||
|
||||
pub fn ser_where(&self) -> Option<&[ast::WherePredicate]> {
|
||||
self.ser_where.as_ref().map(Vec::as_slice)
|
||||
self.ser_where.as_ref().map(|vec| &vec[..])
|
||||
}
|
||||
|
||||
pub fn de_where(&self) -> Option<&[ast::WherePredicate]> {
|
||||
self.de_where.as_ref().map(Vec::as_slice)
|
||||
self.de_where.as_ref().map(|vec| &vec[..])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,11 +362,11 @@ impl FieldAttrs {
|
||||
}
|
||||
|
||||
pub fn ser_where(&self) -> Option<&[ast::WherePredicate]> {
|
||||
self.ser_where.as_ref().map(Vec::as_slice)
|
||||
self.ser_where.as_ref().map(|vec| &vec[..])
|
||||
}
|
||||
|
||||
pub fn de_where(&self) -> Option<&[ast::WherePredicate]> {
|
||||
self.de_where.as_ref().map(Vec::as_slice)
|
||||
self.de_where.as_ref().map(|vec| &vec[..])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user