build fixes

macos-click-through
Keith Simmons 5 years ago
parent a874537c35
commit 2494b37070

@ -426,13 +426,13 @@ fn parse_win_pos(win_pos_arguments: Vec<Value>) -> Result<RedrawEvent> {
} }
} }
fn parse_window_anchor(anchor: Value) -> Result<WindowAnchor> { fn parse_window_anchor(value: &Value) -> Result<WindowAnchor> {
match parse_string(&anchor) { match parse_string(value).ok().as_deref() {
Ok("NW") => Ok(WindowAnchor::NorthWest), Some("NW") => Ok(WindowAnchor::NorthWest),
Ok("NE") => Ok(WindowAnchor::NorthEast), Some("NE") => Ok(WindowAnchor::NorthEast),
Ok("SW") => Ok(WindowAnchor::SouthWest), Some("SW") => Ok(WindowAnchor::SouthWest),
Ok("SE") => Ok(WindowAnchor::SouthEast), Some("SE") => Ok(WindowAnchor::SouthEast),
_ => Err(InvalidWindowAnchor(value)) _ => Err(EventParseError::InvalidWindowAnchor(value.clone()))
} }
} }

Loading…
Cancel
Save