mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
rust/protover: fix parsing docs
The function takes an already validated utf-8 string, and
it never checks if the version numbers are an empty string.
That parse error happens later.
Fix on 701c2b69f5
This commit is contained in:
parent
7bb658a633
commit
e65a4fa42c
1 changed files with 3 additions and 2 deletions
|
@ -452,8 +452,9 @@ impl UnvalidatedProtoEntry {
|
|||
/// following are true:
|
||||
///
|
||||
/// * If a protocol name is an empty string, e.g. `"Cons=1,3 =3-5"`.
|
||||
/// * If a protocol name cannot be parsed as utf-8.
|
||||
/// * If the version numbers are an empty string, e.g. `"Cons="`.
|
||||
/// * If an entry has no equals sign, e.g. `"Cons=1,3 Desc"`.
|
||||
/// * If there is leading or trailing whitespace, e.g. `" Cons=1,3 Link=3"`.
|
||||
/// * If there is any other extra whitespice, e.g. `"Cons=1,3 Link=3"`.
|
||||
fn parse_protocol_and_version_str<'a>(
|
||||
protocol_string: &'a str,
|
||||
) -> Result<Vec<(&'a str, &'a str)>, ProtoverError> {
|
||||
|
|
Loading…
Add table
Reference in a new issue