Skip to content

Commit 6bb4c71

Browse files
authored
Merge pull request #1555 from jeckersb/untest-require_value
kernel_cmdline: remove `cfg(test)` for `require_value_*` methods
2 parents 1c552d8 + 04860d5 commit 6bb4c71

File tree

1 file changed

+3
-4
lines changed
  • crates/kernel_cmdline/src

1 file changed

+3
-4
lines changed

crates/kernel_cmdline/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ impl<'a> Cmdline<'a> {
106106
/// Find the value of the kernel argument with the provided name, which must be present.
107107
///
108108
/// Otherwise the same as [`Self::value_of`].
109-
#[cfg(test)]
110109
pub fn require_value_of(&'a self, key: impl AsRef<[u8]>) -> Result<&'a [u8]> {
111110
let key = key.as_ref();
112111
self.value_of(key).ok_or_else(|| {
@@ -115,10 +114,10 @@ impl<'a> Cmdline<'a> {
115114
})
116115
}
117116

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.
119119
///
120-
/// Otherwise the same as [`Self::value_of`].
121-
#[cfg(test)]
120+
/// Otherwise the same as [`Self::value_of_utf8`].
122121
pub fn require_value_of_utf8(&'a self, key: &str) -> Result<&'a str> {
123122
self.value_of_utf8(key)?
124123
.ok_or_else(|| anyhow::anyhow!("Failed to find kernel argument '{key}'"))

0 commit comments

Comments
 (0)