Skip to content
Merged
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
1 change: 1 addition & 0 deletions gpt_disk_io/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased

* MSRV increased to 1.81.
* The `Error` trait is now unconditionally implemented for all error types.

# 0.16.1

Expand Down
6 changes: 4 additions & 2 deletions gpt_disk_io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ See also the [`gpt_disk_types`] package.

## Features

* `std`: Enables the `StdBlockIo` type, as well as `std::error::Error`
implementations for all of the error types. Off by default.
No features are enabled by default.

* `alloc`: Enables `Vec` implementation of `BlockIoAdapter`.
* `std`: Enables `std::io` implementations of `BlockIoAdapter`.

## Minimum Supported Rust Version (MSRV)

Expand Down
7 changes: 2 additions & 5 deletions gpt_disk_io/src/block_io/slice_block_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ use gpt_disk_types::{BlockSize, Lba};
use alloc::vec::Vec;

/// Error type used for `&[u8]` and `&mut [u8]` versions of [`BlockIoAdapter`].
///
/// If the `std` feature is enabled, this type implements the [`Error`]
/// trait.
///
/// [`Error`]: std::error::Error
#[allow(clippy::module_name_repetitions)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub enum SliceBlockIoError {
Expand Down Expand Up @@ -60,6 +55,8 @@ impl Display for SliceBlockIoError {
}
}

impl core::error::Error for SliceBlockIoError {}

#[track_caller]
fn buffer_byte_range_opt(
block_size: BlockSize,
Expand Down
5 changes: 5 additions & 0 deletions gpt_disk_io/src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ where
}
}

impl<IoError> core::error::Error for DiskError<IoError> where
IoError: Debug + Display
{
}

/// Read and write GPT disk data.
///
/// The disk is accessed via an object implementing the [`BlockIo`]
Expand Down
6 changes: 1 addition & 5 deletions gpt_disk_io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
//! # Features
//!
//! * `alloc`: Enables [`Vec`] implementation of [`BlockIoAdapter`].
//! * `std`: Enables [`std::io`] implementations of [`BlockIoAdapter`],
//! as well as `std::error::Error` implementations for all of the
//! error types. Off by default.
//! * `std`: Enables [`std::io`] implementations of [`BlockIoAdapter`].
//!
//! # Examples
//!
Expand Down Expand Up @@ -136,8 +134,6 @@ extern crate alloc;

mod block_io;
mod disk;
#[cfg(feature = "std")]
mod std_support;

// Re-export dependencies.
pub use gpt_disk_types;
Expand Down
15 changes: 0 additions & 15 deletions gpt_disk_io/src/std_support.rs

This file was deleted.

Loading