@@ -52,11 +52,11 @@ impl CommandLineTag {
5252 /// ```rust,no_run
5353 /// # let boot_info = unsafe { multiboot2::load(0xdeadbeef).unwrap() };
5454 /// if let Some(tag) = boot_info.command_line_tag() {
55- /// let command_line = tag.command_line ();
55+ /// let command_line = tag.cmdline ();
5656 /// assert_eq!(Ok("/bootarg"), command_line);
5757 /// }
5858 /// ```
59- pub fn command_line ( & self ) -> Result < & str , str:: Utf8Error > {
59+ pub fn cmdline ( & self ) -> Result < & str , str:: Utf8Error > {
6060 Tag :: get_dst_str_slice ( & self . cmdline )
6161 }
6262}
@@ -66,7 +66,7 @@ impl Debug for CommandLineTag {
6666 f. debug_struct ( "CommandLineTag" )
6767 . field ( "typ" , & { self . typ } )
6868 . field ( "size" , & { self . size } )
69- . field ( "cmdline" , & self . command_line ( ) )
69+ . field ( "cmdline" , & self . cmdline ( ) )
7070 . finish ( )
7171 }
7272}
@@ -115,7 +115,7 @@ mod tests {
115115 let tag = unsafe { & * tag. as_ptr ( ) . cast :: < Tag > ( ) } ;
116116 let tag = tag. cast_tag :: < CommandLineTag > ( ) ;
117117 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 ) ;
119119 }
120120
121121 /// Test to generate a tag from a given string.
@@ -127,5 +127,6 @@ mod tests {
127127 let tag = CommandLineTag :: new ( MSG ) ;
128128 let bytes = tag. struct_as_bytes ( ) ;
129129 assert_eq ! ( bytes, get_bytes( ) ) ;
130+ assert_eq ! ( tag. cmdline( ) , Ok ( MSG ) ) ;
130131 }
131132}
0 commit comments