Support borrowed tokens in serde_test

This commit is contained in:
David Tolnay
2017-04-04 09:56:01 -07:00
parent cee3efbda8
commit 211e2bb8d9
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -39,12 +39,18 @@ pub enum Token<'a> {
/// A serialized `str`.
Str(&'a str),
/// A borrowed `str`.
BorrowedStr(&'a str),
/// A serialized `String`.
String(String),
/// A serialized `[u8]`
Bytes(&'a [u8]),
/// A borrowed `[u8]`.
BorrowedBytes(&'a [u8]),
/// A serialized `ByteBuf`
ByteBuf(Vec<u8>),