From d6444900636113f86924d4bed750ab0aba66036e Mon Sep 17 00:00:00 2001 From: Taiki Endo <te316e89@gmail.com> Date: Tue, 14 Jan 2025 19:58:51 +0900 Subject: [PATCH 1/2] Use ubuntu-22.04 in CI jobs that using ROS2 humble --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb5ae94f..9bc00183 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: test: name: Test Suite - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -72,7 +72,7 @@ jobs: clippy: name: Clippy - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - uses: actions/checkout@v4 From 7ecee33b96913b5a56f67be1514304018fdf000b Mon Sep 17 00:00:00 2001 From: Taiki Endo <te316e89@gmail.com> Date: Wed, 15 Jan 2025 11:05:24 +0900 Subject: [PATCH 2/2] Fix clippy::unnecessary_map_or warning ``` error: this `map_or` is redundant --> tf_rosrust/src/tf_buffer.rs:95:24 | 95 | if self | ________________________^ 96 | | .transform_data 97 | | .get(&TfGraphNode { 98 | | child: v.clone(), 99 | | parent: current_node.clone(), 100 | | }) 101 | | .map_or(false, |chain| chain.has_valid_transform(time)) | |_______________________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `-D clippy::unnecessary-map-or` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]` help: use is_some_and instead | 95 ~ if self 96 + .transform_data 97 + .get(&TfGraphNode { 98 + child: v.clone(), 99 + parent: current_node.clone(), 100 + }).is_some_and(|chain| chain.has_valid_transform(time)) | ``` --- tf_r2r/src/tf_buffer.rs | 2 +- tf_rosrust/src/tf_buffer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tf_r2r/src/tf_buffer.rs b/tf_r2r/src/tf_buffer.rs index 2609c683..510ab89b 100644 --- a/tf_r2r/src/tf_buffer.rs +++ b/tf_r2r/src/tf_buffer.rs @@ -99,7 +99,7 @@ impl TfBuffer { child: v.clone(), parent: current_node.clone(), }) - .map_or(false, |chain| chain.has_valid_transform(time)) + .is_some_and(|chain| chain.has_valid_transform(time)) { parents.insert(v.to_string(), current_node.clone()); frontier.push_front(v.to_string()); diff --git a/tf_rosrust/src/tf_buffer.rs b/tf_rosrust/src/tf_buffer.rs index 90737c64..62dd26cd 100644 --- a/tf_rosrust/src/tf_buffer.rs +++ b/tf_rosrust/src/tf_buffer.rs @@ -98,7 +98,7 @@ impl TfBuffer { child: v.clone(), parent: current_node.clone(), }) - .map_or(false, |chain| chain.has_valid_transform(time)) + .is_some_and(|chain| chain.has_valid_transform(time)) { parents.insert(v.to_string(), current_node.clone()); frontier.push_front(v.to_string());