File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
crates/kernel_cmdline/src Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,6 @@ impl<'a> Cmdline<'a> {
106
106
/// Find the value of the kernel argument with the provided name, which must be present.
107
107
///
108
108
/// Otherwise the same as [`Self::value_of`].
109
- #[ cfg( test) ]
110
109
pub fn require_value_of ( & ' a self , key : impl AsRef < [ u8 ] > ) -> Result < & ' a [ u8 ] > {
111
110
let key = key. as_ref ( ) ;
112
111
self . value_of ( key) . ok_or_else ( || {
@@ -115,10 +114,10 @@ impl<'a> Cmdline<'a> {
115
114
} )
116
115
}
117
116
118
- /// Find the value of the kernel argument with the provided name, which must be present.
117
+ /// Find the UTF-8 value of the kernel argument with the provided
118
+ /// name, which must be present.
119
119
///
120
- /// Otherwise the same as [`Self::value_of`].
121
- #[ cfg( test) ]
120
+ /// Otherwise the same as [`Self::value_of_utf8`].
122
121
pub fn require_value_of_utf8 ( & ' a self , key : & str ) -> Result < & ' a str > {
123
122
self . value_of_utf8 ( key) ?
124
123
. ok_or_else ( || anyhow:: anyhow!( "Failed to find kernel argument '{key}'" ) )
You can’t perform that action at this time.
0 commit comments