Upgrade yap from 0.11 to 0.12
This commit is contained in:
parent
19a29934fa
commit
7a89ab392c
@ -19,7 +19,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||
headers = "0.4.0"
|
||||
ruma-common = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
yap = "0.11.0"
|
||||
yap = "0.12.0"
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3.16"
|
||||
|
@ -41,7 +41,7 @@ impl XMatrix {
|
||||
|
||||
fn parse_token<'a>(tokens: &mut impl Tokens<Item = &'a u8>) -> Option<Vec<u8>> {
|
||||
tokens.optional(|t| {
|
||||
let token: Vec<u8> = t.tokens_while(|c| is_tchar(**c)).copied().collect();
|
||||
let token: Vec<u8> = t.take_while(|c| is_tchar(**c)).as_iter().copied().collect();
|
||||
if !token.is_empty() {
|
||||
Some(token)
|
||||
} else {
|
||||
@ -53,7 +53,8 @@ fn parse_token<'a>(tokens: &mut impl Tokens<Item = &'a u8>) -> Option<Vec<u8>> {
|
||||
|
||||
fn parse_token_with_colons<'a>(tokens: &mut impl Tokens<Item = &'a u8>) -> Option<Vec<u8>> {
|
||||
tokens.optional(|t| {
|
||||
let token: Vec<u8> = t.tokens_while(|c| is_tchar(**c) || **c == b':').copied().collect();
|
||||
let token: Vec<u8> =
|
||||
t.take_while(|c| is_tchar(**c) || **c == b':').as_iter().copied().collect();
|
||||
if !token.is_empty() {
|
||||
Some(token)
|
||||
} else {
|
||||
@ -144,7 +145,7 @@ fn parse_xmatrix<'a>(tokens: &mut impl Tokens<Item = &'a u8>) -> Option<XMatrix>
|
||||
let mut key = None;
|
||||
let mut sig = None;
|
||||
|
||||
for (name, value) in t.sep_by(|t| parse_xmatrix_field(t), |t| t.token(&b',')) {
|
||||
for (name, value) in t.sep_by(|t| parse_xmatrix_field(t), |t| t.token(&b',')).as_iter() {
|
||||
match name.as_str() {
|
||||
"origin" => {
|
||||
if origin.is_some() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user