Skip to content

Commit

Permalink
Remove some unnecessary allow()
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Sep 10, 2024
1 parent 7025317 commit 37871f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/api/image_array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ pub(crate) enum TransmissionElementType {
)]
#[repr(i32)]
pub(crate) enum ImageElementType {
I32 = TransmissionElementType::I32 as i32,
/// See [`TransmissionElementType::I32`].
I32 = 2,
}

trait AsTransmissionElementType: 'static + Into<i32> + AnyBitPattern {
Expand Down
6 changes: 5 additions & 1 deletion src/api/image_array/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ impl Response for ASCOMResult<ImageBytesResponse> {
},
);
bytes.extend_from_slice(bytes_of(&metadata));
#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
#[allow(
clippy::as_conversions,
clippy::cast_possible_truncation,
clippy::cast_sign_loss
)]
match img_array.transmission_element_type {
TransmissionElementType::I32 => {
bytes.extend(img_array.iter().flat_map(|&i| i.to_le_bytes()));
Expand Down
6 changes: 1 addition & 5 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ The SetupDialog method has been omitted from the Alpaca Device API because it pr
*/

#![allow(
rustdoc::broken_intra_doc_links,
clippy::doc_markdown,
clippy::as_conversions, // triggers on derive-generated code https://github.com/rust-lang/rust-clippy/issues/9657
)]
#![allow(clippy::doc_markdown)]

mod bool_param;
mod devices_impl;
Expand Down

0 comments on commit 37871f9

Please sign in to comment.