chore: Cleaning things in prep for rust 2021
Also remove a NUL byte in a test string literal; some editors drop them.pull/24376/head
parent
dad426d02e
commit
9e39e91139
|
@ -120,7 +120,7 @@ impl Client {
|
|||
#[derive(serde::Serialize)]
|
||||
struct WriterIdBody {
|
||||
id: u32,
|
||||
};
|
||||
}
|
||||
|
||||
let r = self
|
||||
.http
|
||||
|
|
|
@ -178,7 +178,7 @@ fn parse_tsm_field_key_value(rem_key: impl Iterator<Item = u8>) -> Result<String
|
|||
Key2, // saw #!
|
||||
Key3, // saw #!~
|
||||
Done,
|
||||
};
|
||||
}
|
||||
|
||||
let mut field_name = String::with_capacity(100);
|
||||
let mut state = State::Data;
|
||||
|
@ -231,7 +231,7 @@ fn parse_tsm_field_key_value(rem_key: impl Iterator<Item = u8>) -> Result<String
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// loop over input byte by byte and once we are at the end of the field key,
|
||||
// consume the rest of the key stream (ignoring all remaining characters)
|
||||
|
@ -316,7 +316,7 @@ fn parse_tsm_tag_key(rem_key: impl Iterator<Item = u8>) -> Result<KeyType, DataE
|
|||
Measurement,
|
||||
Field,
|
||||
Escape,
|
||||
};
|
||||
}
|
||||
|
||||
let mut state = State::Data;
|
||||
let mut key = String::with_capacity(250);
|
||||
|
@ -402,7 +402,7 @@ fn parse_tsm_tag_value(
|
|||
Start,
|
||||
Data,
|
||||
Escape,
|
||||
};
|
||||
}
|
||||
|
||||
let mut state = State::Start;
|
||||
let mut tag_value = String::with_capacity(100);
|
||||
|
@ -668,8 +668,9 @@ mod tests {
|
|||
// expect that a representation of the actual TSM key is in the error message
|
||||
assert!(
|
||||
err_str.contains(
|
||||
"Error while parsing tsm tag key '1234567887654321, |