Skip to content

Commit

Permalink
Merge pull request #578 from elfenpiff/iox2-3-fix-1.84-clippy-warnings
Browse files Browse the repository at this point in the history
[#3] Fix rust 1.84 clippy warnings
  • Loading branch information
elfenpiff authored Jan 11, 2025
2 parents 3a3930b + 3494de2 commit 428e09a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iceoryx2-ffi/ffi/src/api/message_type_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl From<&TypeDetail> for iox2_type_detail_t {
Self {
variant: (&value.variant).into(),
type_name: core::array::from_fn(|n| {
if n < value.type_name.as_bytes().len() {
if n < value.type_name.len() {
value.type_name.as_bytes()[n] as _
} else {
0
Expand Down
4 changes: 2 additions & 2 deletions iceoryx2-ffi/ffi/src/api/static_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ impl From<&StaticConfig> for iox2_static_config_t {
}
}),
name: core::array::from_fn(|n| {
debug_assert!(value.name().as_bytes().len() + 1 < IOX2_SERVICE_NAME_LENGTH);
debug_assert!(value.name().len() + 1 < IOX2_SERVICE_NAME_LENGTH);

if n < value.name().as_bytes().len() {
if n < value.name().len() {
value.name().as_bytes()[n] as _
} else {
0
Expand Down

0 comments on commit 428e09a

Please sign in to comment.