Fix build on 1.5.0 which does not have Vec::as_slice
This commit is contained in:
parent
bd40830905
commit
45c51d3198
@ -138,11 +138,11 @@ impl ContainerAttrs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn ser_where(&self) -> Option<&[ast::WherePredicate]> {
|
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]> {
|
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]> {
|
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]> {
|
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[..])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user