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> {
match parse_string(&anchor) {
Ok("NW") => Ok(WindowAnchor::NorthWest),
Ok("NE") => Ok(WindowAnchor::NorthEast),
Ok("SW") => Ok(WindowAnchor::SouthWest),
Ok("SE") => Ok(WindowAnchor::SouthEast),
_ => Err(InvalidWindowAnchor(value))
fn parse_window_anchor(value: &Value) -> Result<WindowAnchor> {
match parse_string(value).ok().as_deref() {
Some("NW") => Ok(WindowAnchor::NorthWest),
Some("NE") => Ok(WindowAnchor::NorthEast),
Some("SW") => Ok(WindowAnchor::SouthWest),
Some("SE") => Ok(WindowAnchor::SouthEast),
_ => Err(EventParseError::InvalidWindowAnchor(value.clone()))
}
}

Loading…
Cancel
Save