autocommit 2022-02-09 17:26:50 CET
This commit is contained in:
parent
4190b910f8
commit
8faab3fe53
25 changed files with 1081 additions and 316 deletions
|
|
@ -36,6 +36,13 @@ impl<'a> MsgFormatter<'a> {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn optstr<S: AsRef<[u8]> + ?Sized>(&mut self, s: Option<&S>) -> &mut Self {
|
||||
match s {
|
||||
Some(s) => self.string(s),
|
||||
_ => self.uint(0),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn string<S: AsRef<[u8]> + ?Sized>(&mut self, s: &S) -> &mut Self {
|
||||
let s = s.as_ref();
|
||||
let len = s.len() + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue