mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 18:54:05 +02:00
tweak parse_prop for readability
This commit is contained in:
parent
9fb038e777
commit
bf27b6c892
1 changed files with 1 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ impl<'a> RawEntity<'a> {
|
||||||
&self,
|
&self,
|
||||||
key: &'static str,
|
key: &'static str,
|
||||||
) -> Option<Result<T, EntityParseError>> {
|
) -> Option<Result<T, EntityParseError>> {
|
||||||
Some(T::parse(self.prop(key)?))
|
self.prop(key).map(T::parse)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse<E: Deserialize<'a>>(&self) -> Result<E, VdfError> {
|
pub fn parse<E: Deserialize<'a>>(&self) -> Result<E, VdfError> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue