Skip to content

MSRV bump + rust edition 2021 + typos check in CI #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: QA

on: [ push, pull_request ]

jobs:
spellcheck:
name: Spellcheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Executes "typos ."
- uses: crate-ci/[email protected]
12 changes: 6 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
rust:
- stable
- nightly
- 1.52.1 # MSVR
- 1.56.1 # MSVR
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Important preparation step: override the latest default Rust version in GitHub CI
# with the current value of the iteration in the "strategy.matrix.rust"-array.
- uses: actions-rs/toolchain@v1
Expand All @@ -41,9 +41,9 @@ jobs:
rust:
- stable
- nightly
- 1.52.1 # MSVR
- 1.56.1 # MSVR
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Important preparation step: override the latest default Rust version in GitHub CI
# with the current value of the iteration in the "strategy.matrix.rust"-array.
- uses: actions-rs/toolchain@v1
Expand All @@ -65,9 +65,9 @@ jobs:
strategy:
matrix:
rust:
- 1.52.1 # MSVR
- 1.56.1 # MSVR
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Important preparation step: override the latest default Rust version in GitHub CI
# with the current value of the iteration in the "strategy.matrix.rust"-array.
- uses: actions-rs/toolchain@v1
Expand Down
13 changes: 13 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configuration for the typos spell checker utility (<https://github.com/crate-ci/typos>).

[files]
extend-exclude = [
# "uefi/src/table/boot.rs"
]

[default.extend-words]
Rela = "Rela"

[default.extend-identifiers]
# FOOBAR = "FOOBAR"

2 changes: 1 addition & 1 deletion multiboot2-header/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
"Philipp Schuster <[email protected]>"
]
license = "MIT/Apache-2.0"
edition = "2018"
edition = "2021"
categories = [
"no-std",
"parsing",
Expand Down
3 changes: 3 additions & 0 deletions multiboot2-header/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG for crate `multiboot2-header`

## Unreleased
- MSRV is 1.56.1

## v0.2.0 (2022-05-03)
- **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag`
- **BREAKING** some paths changed from `multiboot2_header::header` to `multiboot2_header::builder`
Expand Down
2 changes: 1 addition & 1 deletion multiboot2-header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You may need a special linker script to place this in a LOAD segment with a file
See specification.

## MSRV
The MSRV is 1.52.1 stable.
The MSRV is 1.56.1 stable.

## License & Contribution

Expand Down
4 changes: 1 addition & 3 deletions multiboot2-header/src/builder/information_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub struct InformationRequestHeaderTagBuilder {
#[cfg(feature = "builder")]
impl InformationRequestHeaderTagBuilder {
/// New builder.
#[allow(clippy::missing_const_for_fn)] // TODO remove once MSRV is higher than 1.52.1
pub fn new(flag: HeaderTagFlag) -> Self {
Self {
irs: BTreeSet::new(),
Expand All @@ -31,7 +30,6 @@ impl InformationRequestHeaderTagBuilder {

/// Returns the expected length of the information request tag,
/// when the `build`-method gets called.
#[allow(clippy::missing_const_for_fn)] // TODO remove once MSRV is higher than 1.52.1
pub fn expected_len(&self) -> usize {
let basic_header_size = size_of::<InformationRequestHeaderTag<0>>();
let req_tags_size = self.irs.len() * size_of::<MbiTagType>();
Expand Down Expand Up @@ -76,7 +74,7 @@ impl InformationRequestHeaderTagBuilder {

for tag in &self.irs {
let bytes: [u8; 4] = (*tag as u32).to_ne_bytes();
data.extend(&bytes);
data.extend(bytes);
}

debug_assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion multiboot2-header/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//! ```
//!
//! ## MSRV
//! The MSRV is 1.52.1 stable.
//! The MSRV is 1.56.1 stable.

#![no_std]
#![deny(rustdoc::all)]
Expand Down
2 changes: 1 addition & 1 deletion multiboot2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
"Philipp Schuster <[email protected]>"
]
license = "MIT/Apache-2.0"
edition = "2018"
edition = "2021"
categories = [
"no-std",
"parsing",
Expand Down
3 changes: 3 additions & 0 deletions multiboot2/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG for crate `multiboot2`

## Unreleased
- MSRV is 1.56.1

## 0.14.1 (2023-03-09)
- fixed the calculation of the last area of the memory map tag ([#119](https://github.com/rust-osdev/multiboot2/pull/119))
(Previously, iterating the EFI Memory map resulted in a superfluous entry as it ran over the next tag)
Expand Down
2 changes: 1 addition & 1 deletion multiboot2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ other fields | variable
All tags and the mbi itself are 8-byte aligned. The last tag must be the _end tag_, which is a tag of type `0` and size `8`.

## MSRV
The MSRV is 1.52.1 stable.
The MSRV is 1.56.1 stable.

## License & Contribution

Expand Down
6 changes: 3 additions & 3 deletions multiboot2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! ```
//!
//! ## MSRV
//! The MSRV is 1.52.1 stable.
//! The MSRV is 1.56.1 stable.

// this crate can use std in tests only
#[cfg_attr(test, macro_use)]
Expand Down Expand Up @@ -108,7 +108,7 @@ pub const MULTIBOOT2_BOOTLOADER_MAGIC: u32 = 0x36d76289;
/// environment (segfault) but also in UEFI-applications, where the referenced
/// memory is not (identity) mapped (UEFI does only identity mapping).
/// * The memory at `address` must not be modified after calling `load` or the
/// program may observe unsychronized mutation.
/// program may observe unsynchronized mutation.
pub unsafe fn load(address: usize) -> Result<BootInformation, MbiLoadError> {
load_with_offset(address, 0)
}
Expand All @@ -131,7 +131,7 @@ pub unsafe fn load(address: usize) -> Result<BootInformation, MbiLoadError> {
/// environment (segfault) but also in UEFI-applications, where the referenced
/// memory is not (identity) mapped (UEFI does only identity mapping).
/// * The memory at `address` must not be modified after calling `load` or the
/// program may observe unsychronized mutation.
/// program may observe unsynchronized mutation.
pub unsafe fn load_with_offset(
address: usize,
offset: usize,
Expand Down
2 changes: 1 addition & 1 deletion multiboot2/src/rsdp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct RsdpV1Tag {
}

impl RsdpV1Tag {
/// The "RSD PTR " marker singature.
/// The "RSD PTR " marker signature.
///
/// This is originally a 8-byte C string (not null terminated!) that must contain "RSD PTR "
pub fn signature(&self) -> Result<&str, Utf8Error> {
Expand Down
2 changes: 1 addition & 1 deletion multiboot2/src/vbe_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl fmt::Debug for VBEModeInfo {

/// A VBE colour field.
///
/// Descirbes the size and position of some colour capability.
/// Describes the size and position of some colour capability.
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[repr(C, packed)]
pub struct VBEField {
Expand Down