1
0
Fork 0
forked from wry/wry

autocommit 2022-01-04 15:30:21 CET

This commit is contained in:
Julian Orth 2022-01-04 15:30:21 +01:00
parent 30376c595c
commit cbbc41a463
40 changed files with 725 additions and 189 deletions

View file

@ -46,8 +46,11 @@ impl<'a, 'b> MsgParser<'a, 'b> {
self.int().map(|i| i as u32)
}
pub fn object(&mut self) -> Result<ObjectId, MsgParserError> {
self.int().map(|i| ObjectId::from_raw(i as u32))
pub fn object<T>(&mut self) -> Result<T, MsgParserError>
where
ObjectId: Into<T>,
{
self.int().map(|i| ObjectId::from_raw(i as u32).into())
}
pub fn global(&mut self) -> Result<GlobalName, MsgParserError> {