File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ required-features = ["builder"]
3535default = [" builder" ]
3636alloc = []
3737builder = [" alloc" ]
38+ # Nightly-only features, which will eventually be stabilized.
39+ unstable = []
3840
3941[dependencies ]
4042# used for MBI tags
Original file line number Diff line number Diff line change 33## Unreleased
44- MSRV is 1.56.1
55- renamed the ` std ` feature to ` alloc `
6+ - added the optional ` unstable ` feature (requires nightly)
7+ - implement ` core::error::Error ` for ` LoadError `
68
79## v0.2.0 (2022-05-03)
810- ** BREAKING** renamed ` EntryHeaderTag ` to ` EntryAddressHeaderTag `
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use crate::{
55 RelocatableHeaderTag ,
66} ;
77use core:: convert:: TryInto ;
8- use core:: fmt:: { Debug , Formatter } ;
8+ use core:: fmt:: { Debug , Display , Formatter } ;
99use core:: mem:: size_of;
1010
1111/// Magic value for a [`Multiboot2Header`], as defined in spec.
@@ -212,6 +212,15 @@ pub enum LoadError {
212212 TooSmall ,
213213}
214214
215+ impl Display for LoadError {
216+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> core:: fmt:: Result {
217+ write ! ( f, "{:?}" , self )
218+ }
219+ }
220+
221+ #[ cfg( feature = "unstable" ) ]
222+ impl core:: error:: Error for LoadError { }
223+
215224/// **Use this only if you know what you do. You probably want to use
216225/// [`Multiboot2Header`] instead.**
217226///
Original file line number Diff line number Diff line change 3434//! The MSRV is 1.56.1 stable.
3535
3636#![ no_std]
37+ #![ cfg_attr( feature = "unstable" , feature( error_in_core) ) ]
3738#![ deny( rustdoc:: all) ]
3839#![ deny( clippy:: all) ]
3940#![ deny( clippy:: missing_const_for_fn) ]
@@ -77,6 +78,5 @@ pub use self::relocatable::*;
7778pub use self :: tags:: * ;
7879pub use self :: uefi_bs:: * ;
7980
80- /// Re-export of [`multiboot2::TagType`] from `multiboot2`-crate as `MbiTagType`, i.e. tags that
81- /// describe the entries in the Multiboot2 Information Structure (MBI).
81+ /// Re-export of [`multiboot2::TagType`] from `multiboot2`-crate.
8282pub use multiboot2:: TagType as MbiTagType ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ documentation = "https://docs.rs/multiboot2"
3636default = [" builder" ]
3737alloc = []
3838builder = [" alloc" ]
39- # Nightly-only features that will eventually be stabilized.
39+ # Nightly-only features, which will eventually be stabilized.
4040unstable = []
4141
4242[dependencies ]
You can’t perform that action at this time.
0 commit comments