mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
nix ci
This commit is contained in:
parent
35ef379950
commit
0850bb8dbd
13 changed files with 946 additions and 55 deletions
|
|
@ -98,7 +98,7 @@ impl<'a> RawEntity<'a> {
|
|||
|
||||
pub fn prop(&self, key: &'static str) -> Result<&'a str, EntityParseError> {
|
||||
self.properties()
|
||||
.find_map(|(prop_key, value)| (key == prop_key).then(|| value))
|
||||
.find_map(|(prop_key, value)| (key == prop_key).then_some(value))
|
||||
.ok_or(EntityParseError::NoSuchProperty(key))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ pub struct SurfaceEdge {
|
|||
|
||||
impl SurfaceEdge {
|
||||
pub fn edge_index(&self) -> u32 {
|
||||
self.edge.abs() as u32
|
||||
self.edge.unsigned_abs()
|
||||
}
|
||||
|
||||
pub fn direction(&self) -> EdgeDirection {
|
||||
|
|
@ -374,7 +374,7 @@ pub struct Face {
|
|||
|
||||
impl Face {
|
||||
pub fn displacement_index(&self) -> Option<i16> {
|
||||
(self.displacement_info >= 0).then(|| self.displacement_info)
|
||||
(self.displacement_info >= 0).then_some(self.displacement_info)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue