Skip to content

Commit 89eae65

Browse files
authored
Update GitHub actions (#352)
* Update GitHub actions * Downgrade rust-toolchain to the latest stable version (1.74.0) from 1.80.0 * Fix issues with latest clippy * Fix rustdoc check issue * Update Rust toolchain in Dockerfile
1 parent 3c5cbfa commit 89eae65

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ jobs:
3737
container:
3838
image: ${{ matrix.docker_image }}
3939
steps:
40-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
4141

4242
- name: Search packages in this repository
4343
id: list_packages
4444
run: |
4545
echo ::set-output name=package_list::$(colcon list --names-only)
4646
4747
- name: Setup ROS environment
48-
uses: ros-tooling/setup-ros@v0.6
48+
uses: ros-tooling/setup-ros@v0.7
4949
with:
5050
required-ros-distributions: ${{ matrix.ros_distribution }}
5151
use-ros2-testing: ${{ matrix.ros_distribution == 'rolling' }}
5252

5353
- name: Setup Rust
54-
uses: dtolnay/rust-toolchain@1.71.0
54+
uses: dtolnay/rust-toolchain@1.74.0
5555
with:
5656
components: clippy, rustfmt
5757

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
1212
&& rm -rf /var/lib/apt/lists/*
1313

1414
# Install Rust and the cargo-ament-build plugin
15-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.71.0 -y
15+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.74.0 -y
1616
ENV PATH=/root/.cargo/bin:$PATH
1717
RUN cargo install cargo-ament-build
1818

rclrs/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,13 @@ pub fn create_node(context: &Context, node_name: &str) -> Result<Arc<Node>, Rclr
8989
Node::new(context, node_name)
9090
}
9191

92-
/// Creates a [`NodeBuilder`][1].
92+
/// Creates a [`NodeBuilder`].
9393
///
94-
/// Convenience function equivalent to [`NodeBuilder::new()`][2] and [`Node::builder()`][3].
94+
/// Convenience function equivalent to [`NodeBuilder::new()`][1] and [`Node::builder()`][2].
9595
/// Please see that function's documentation.
9696
///
97-
/// [1]: crate::NodeBuilder
98-
/// [2]: crate::NodeBuilder::new
99-
/// [3]: crate::Node::builder
97+
/// [1]: crate::NodeBuilder::new
98+
/// [2]: crate::Node::builder
10099
///
101100
/// # Example
102101
/// ```

rosidl_runtime_rs/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ macro_rules! string_impl {
250250

251251
impl PartialOrd for $string {
252252
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
253-
self.deref().partial_cmp(other.deref())
253+
Some(self.cmp(other))
254254
}
255255
}
256256

rosidl_runtime_rs/src/string/serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Serialize for WString {
125125
{
126126
// Not particularly efficient
127127
// SAFETY: See the Display implementation.
128-
let u16_slice = unsafe { std::slice::from_raw_parts(self.data as *mut u16, self.size) };
128+
let u16_slice = unsafe { std::slice::from_raw_parts(self.data, self.size) };
129129
let s = std::string::String::from_utf16_lossy(u16_slice);
130130
serializer.serialize_str(&s)
131131
}

0 commit comments

Comments
 (0)