mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
make parserstate static
This commit is contained in:
parent
25f24b63f6
commit
e5e54de65d
8 changed files with 20 additions and 20 deletions
|
|
@ -101,7 +101,7 @@ pub enum Message<'a> {
|
|||
}
|
||||
|
||||
impl<'a> Parse<'a> for Message<'a> {
|
||||
fn parse(stream: &mut Stream<'a>, state: &ParserState<'a>) -> Result<Self> {
|
||||
fn parse(stream: &mut Stream<'a>, state: &ParserState) -> Result<Self> {
|
||||
let message_type = MessageType::parse(stream, state)?;
|
||||
Self::from_type(message_type, stream, state)
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ impl<'a> Message<'a> {
|
|||
pub fn from_type(
|
||||
message_type: MessageType,
|
||||
stream: &mut Stream<'a>,
|
||||
state: &ParserState<'a>,
|
||||
state: &ParserState,
|
||||
) -> Result<Self> {
|
||||
Ok(match message_type {
|
||||
MessageType::Empty => Message::Empty,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue