mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
cow string table name
This commit is contained in:
parent
9f0acad361
commit
28ad5fafde
2 changed files with 3 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ pub struct FixedUserDataSize {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct StringTable<'a> {
|
||||
pub name: String,
|
||||
pub name: Cow<'a, str>,
|
||||
pub entries: Vec<(u16, StringTableEntry<'a>)>,
|
||||
pub max_entries: u16,
|
||||
pub fixed_user_data_size: Option<FixedUserDataSize>,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use crate::demo::packet::Packet;
|
|||
use crate::demo::parser::analyser::Analyser;
|
||||
|
||||
use crate::ParserState;
|
||||
use std::borrow::Cow;
|
||||
|
||||
pub trait MessageHandler {
|
||||
type Output;
|
||||
|
|
@ -26,7 +27,7 @@ pub trait BorrowMessageHandler: MessageHandler {
|
|||
|
||||
pub struct DemoHandler<'a, T: MessageHandler> {
|
||||
pub tick: u32,
|
||||
string_table_names: Vec<String>,
|
||||
string_table_names: Vec<Cow<'a, str>>,
|
||||
analyser: T,
|
||||
state_handler: ParserState<'a>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue