collaspe if block
This commit is contained in:
parent
60f95a0358
commit
267c53f15d
2 changed files with 3 additions and 5 deletions
|
@ -16,7 +16,7 @@ serde = ["serde_crate"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bstr = "0.2.15"
|
bstr = "0.2.15"
|
||||||
nom = { version = "6", default_features = false, features = ["std"] }
|
nom = { version = "6", default_features = false, features = ["std"] }
|
||||||
serde_crate = { version = "1", package = "serde", optional = true}
|
serde_crate = { version = "1", package = "serde", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
|
|
|
@ -59,10 +59,8 @@ pub fn normalize(input: &[u8]) -> Cow<'_, [u8]> {
|
||||||
return Cow::Borrowed(&[]);
|
return Cow::Borrowed(&[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if size >= 3 {
|
if size >= 3 && input[0] == b'=' && input[size - 1] == b'=' && input[size - 2] != b'\\' {
|
||||||
if input[0] == b'=' && input[size - 1] == b'=' && input[size - 2] != b'\\' {
|
return normalize(&input[1..size]);
|
||||||
return normalize(&input[1..size]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut owned = vec![];
|
let mut owned = vec![];
|
||||||
|
|
Reference in a new issue