Skip to content

Commit

Permalink
[eclipse-iceoryx#195] Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Apr 25, 2024
1 parent cec647f commit 9d87a33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions iceoryx2-bb/elementary/src/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ impl Alignment {
/// * The value must be a power of 2
///
pub unsafe fn new_unchecked(value: usize) -> Self {
Self {
0: log2_of_power_of_2(value as _),
}
Self(log2_of_power_of_2(value as _))
}

/// Returns the value of the [`Alignment`]
Expand Down
5 changes: 1 addition & 4 deletions iceoryx2/src/port/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,7 @@ impl<Service: service::Service, PayloadType: Debug> Subscriber<Service, [Payload
ptr: unsafe {
RawSample::<Header, [PayloadType]>::new_slice_unchecked(
header_ptr,
core::slice::from_raw_parts(
payload_ptr as *const PayloadType,
number_of_elements,
),
core::slice::from_raw_parts(payload_ptr, number_of_elements),
)
},
}
Expand Down

0 comments on commit 9d87a33

Please sign in to comment.