@@ -52,11 +52,11 @@ impl CommandLineTag {
52
52
/// ```rust,no_run
53
53
/// # let boot_info = unsafe { multiboot2::load(0xdeadbeef).unwrap() };
54
54
/// if let Some(tag) = boot_info.command_line_tag() {
55
- /// let command_line = tag.command_line ();
55
+ /// let command_line = tag.cmdline ();
56
56
/// assert_eq!(Ok("/bootarg"), command_line);
57
57
/// }
58
58
/// ```
59
- pub fn command_line ( & self ) -> Result < & str , str:: Utf8Error > {
59
+ pub fn cmdline ( & self ) -> Result < & str , str:: Utf8Error > {
60
60
Tag :: get_dst_str_slice ( & self . cmdline )
61
61
}
62
62
}
@@ -66,7 +66,7 @@ impl Debug for CommandLineTag {
66
66
f. debug_struct ( "CommandLineTag" )
67
67
. field ( "typ" , & { self . typ } )
68
68
. field ( "size" , & { self . size } )
69
- . field ( "cmdline" , & self . command_line ( ) )
69
+ . field ( "cmdline" , & self . cmdline ( ) )
70
70
. finish ( )
71
71
}
72
72
}
@@ -115,7 +115,7 @@ mod tests {
115
115
let tag = unsafe { & * tag. as_ptr ( ) . cast :: < Tag > ( ) } ;
116
116
let tag = tag. cast_tag :: < CommandLineTag > ( ) ;
117
117
assert_eq ! ( { tag. typ } , TagType :: Cmdline ) ;
118
- assert_eq ! ( tag. command_line ( ) . expect( "must be valid UTF-8" ) , MSG ) ;
118
+ assert_eq ! ( tag. cmdline ( ) . expect( "must be valid UTF-8" ) , MSG ) ;
119
119
}
120
120
121
121
/// Test to generate a tag from a given string.
@@ -127,5 +127,6 @@ mod tests {
127
127
let tag = CommandLineTag :: new ( MSG ) ;
128
128
let bytes = tag. struct_as_bytes ( ) ;
129
129
assert_eq ! ( bytes, get_bytes( ) ) ;
130
+ assert_eq ! ( tag. cmdline( ) , Ok ( MSG ) ) ;
130
131
}
131
132
}
0 commit comments