Skip to content

Commit 1322119

Browse files
committed
fix clippy
1 parent c2039c8 commit 1322119

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

multiboot2-header/src/builder/information_request.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub struct InformationRequestHeaderTagBuilder {
2121
#[cfg(feature = "builder")]
2222
impl InformationRequestHeaderTagBuilder {
2323
/// New builder.
24+
#[allow(clippy::missing_const_for_fn)]
2425
pub fn new(flag: HeaderTagFlag) -> Self {
2526
Self {
2627
irs: BTreeSet::new(),
@@ -30,6 +31,7 @@ impl InformationRequestHeaderTagBuilder {
3031

3132
/// Returns the expected length of the information request tag,
3233
/// when the `build`-method gets called.
34+
#[allow(clippy::missing_const_for_fn)]
3335
pub fn expected_len(&self) -> usize {
3436
let basic_header_size = size_of::<InformationRequestHeaderTag<0>>();
3537
let req_tags_size = self.irs.len() * size_of::<MbiTagType>();
@@ -74,6 +76,7 @@ impl InformationRequestHeaderTagBuilder {
7476

7577
for tag in &self.irs {
7678
let bytes: [u8; 4] = (*tag as u32).to_ne_bytes();
79+
#[allow(clippy::needless_borrow)] // required because of MSRV
7780
data.extend(&bytes);
7881
}
7982

multiboot2-header/src/tags.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub enum HeaderTagISA {
1919
/// from the example C code at the bottom of the Multiboot2 specification. This value
2020
/// stands in the `typ` property of [`crate::tags::HeaderTag`].
2121
#[repr(u16)]
22-
#[derive(Copy, Clone, Debug, PartialEq)]
22+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
2323
pub enum HeaderTagType {
2424
/// Type for [`crate::EndHeaderTag`].
2525
End = 0,
@@ -54,7 +54,7 @@ impl HeaderTagType {
5454

5555
/// Flags for Multiboot2 header tags.
5656
#[repr(u16)]
57-
#[derive(Copy, Clone, Debug, PartialEq)]
57+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
5858
pub enum HeaderTagFlag {
5959
Required = 0,
6060
Optional = 1,

multiboot2/src/framebuffer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum FramebufferType<'a> {
3838
},
3939

4040
/// Direct RGB color.
41-
#[allow(missing_docs)]
41+
#[allow(missing_docs, clippy::upper_case_acronyms)]
4242
RGB {
4343
red: FramebufferField,
4444
green: FramebufferField,

multiboot2/src/vbe_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ bitflags! {
329329
/// The MemoryModel field specifies the general type of memory organization used in modes.
330330
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
331331
#[repr(u8)]
332-
#[allow(missing_docs)]
332+
#[allow(missing_docs, clippy::upper_case_acronyms)]
333333
pub enum VBEMemoryModel {
334334
Text = 0x00,
335335
CGAGraphics = 0x01,

0 commit comments

Comments
 (0)