Skip to content

Commit

Permalink
Merge pull request #13 from jazi007/remove-is-some_and
Browse files Browse the repository at this point in the history
remove usage of is_some_and: stable starting from 1.70.0
  • Loading branch information
ytakano authored Sep 20, 2023
2 parents 1ca80fa + af999f2 commit 116c0bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "safe_drive"
version = "0.3.4"
version = "0.3.5"
edition = "2021"
authors = [ "Yuuki Takano <yuuki.takano@tier4.jp>, TIER IV, Inc.", "Seio Inoue" ]
description = "safe_drive: Formally Specified Rust Bindings for ROS2"
Expand Down
15 changes: 10 additions & 5 deletions src/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1559,27 +1559,32 @@ fn notify_action_client(
&& handler
.feedback_handler
.clone()
.is_some_and(|h| (h.borrow_mut())() == CallbackResult::Remove))
.map(|h| (h.borrow_mut())() == CallbackResult::Remove)
.unwrap_or(false))
|| (is_status_ready
&& handler
.status_handler
.clone()
.is_some_and(|h| (h.borrow_mut())() == CallbackResult::Remove))
.map(|h| (h.borrow_mut())() == CallbackResult::Remove)
.unwrap_or(false))
|| (is_goal_response_ready
&& handler
.goal_handler
.clone()
.is_some_and(|h| (h.borrow_mut())() == CallbackResult::Remove))
.map(|h| (h.borrow_mut())() == CallbackResult::Remove)
.unwrap_or(false))
|| (is_cancel_response_ready
&& handler
.cancel_goal_handler
.clone()
.is_some_and(|h| (h.borrow_mut())() == CallbackResult::Remove))
.map(|h| (h.borrow_mut())() == CallbackResult::Remove)
.unwrap_or(false))
|| (is_result_response_ready
&& handler
.result_handler
.clone()
.is_some_and(|h| (h.borrow_mut())() == CallbackResult::Remove))
.map(|h| (h.borrow_mut())() == CallbackResult::Remove)
.unwrap_or(false))
{
Ok(None)
} else {
Expand Down

0 comments on commit 116c0bd

Please sign in to comment.