File tree Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 93
93
rustup component add clippy
94
94
cargo xtask clippy --warnings-as-errors
95
95
96
- - name : Run cargo doc
96
+ - name : Run cargo doc (without unstable)
97
97
run : cargo xtask doc --warnings-as-errors --document-private-items
98
98
99
+ - name : Run cargo doc (with unstable)
100
+ run : cargo xtask doc --warnings-as-errors --document-private-items --unstable
101
+
99
102
- name : Verify generated code is up-to-date
100
103
run : cargo xtask gen-code --check
101
104
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ use {core::alloc::Allocator, core::ptr::NonNull};
29
29
/// `unstable`-feature, it uses the `allocator_api` instead. In that case, the function takes an
30
30
/// additional parameter describing the specific [`Allocator`]. You can use [`alloc::alloc::Global`]
31
31
/// as default.
32
+ ///
33
+ /// [`Allocator`]: https://doc.rust-lang.org/alloc/alloc/trait.Allocator.html
34
+ /// [`alloc::alloc::Global`]: https://doc.rust-lang.org/alloc/alloc/struct.Global.html
32
35
pub ( crate ) fn make_boxed <
33
36
' a ,
34
37
// The UEFI data structure.
Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ impl Directory {
60
60
} )
61
61
}
62
62
63
- /// Wrapper around [`Self::read_entry_boxed_in`] that uses the [`Global`] allocator.
63
+ /// Wrapper around [`Self::read_entry`] that returns an owned copy of the data. It has the same
64
+ /// implications and requirements. On failure, the payload of `Err` is `()´.
64
65
#[ cfg( feature = "alloc" ) ]
65
66
pub fn read_entry_boxed ( & mut self ) -> Result < Option < Box < FileInfo > > > {
66
67
let read_entry_res = self . read_entry ( & mut [ ] ) ;
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ pub trait File: Sized {
184
184
( self . imp ( ) . flush ) ( self . imp ( ) ) . into ( )
185
185
}
186
186
187
- /// Wrapper around [`Self::get_boxed_info_in`] that uses the [`Global`] allocator .
187
+ /// Read the dynamically allocated info for a file .
188
188
#[ cfg( feature = "alloc" ) ]
189
189
fn get_boxed_info < Info : FileProtocolInfo + ?Sized + Debug > ( & mut self ) -> Result < Box < Info > > {
190
190
let fetch_data_fn = |buf| self . get_info :: < Info > ( buf) ;
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ fn doc(opt: &DocOpt) -> Result<()> {
94
94
open : opt. open ,
95
95
document_private_items : opt. document_private_items ,
96
96
} ,
97
- // for all possible features
98
- features : Feature :: more_code ( true , true ) ,
97
+ features : Feature :: more_code ( * opt. unstable , true ) ,
99
98
packages : Package :: published ( ) ,
100
99
release : false ,
101
100
target : None ,
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ pub struct DocOpt {
112
112
#[ clap( long, action) ]
113
113
pub document_private_items : bool ,
114
114
115
+ #[ clap( flatten) ]
116
+ pub unstable : UnstableOpt ,
117
+
115
118
#[ clap( flatten) ]
116
119
pub warning : WarningOpt ,
117
120
}
You can’t perform that action at this time.
0 commit comments