@@ -944,23 +944,24 @@ pub fn print_information() {
944944 let feature_printer = CpuFeaturePrinter :: new ( & cpuid) ;
945945
946946 if let Some ( brand_string) = cpuid. get_processor_brand_string ( ) {
947- infoentry ! ( "Model" , brand_string. as_str( ) ) ;
947+ let brand_string = brand_string. as_str ( ) ;
948+ infoentry ! ( "Model" , "{brand_string}" ) ;
948949 }
949950
950- infoentry ! ( "Frequency" , * CPU_FREQUENCY ) ;
951- infoentry ! ( "SpeedStep Technology" , FEATURES . cpu_speedstep) ;
952-
953- infoentry ! ( "Features " , feature_printer ) ;
954- infoentry ! (
955- "Physical Address Width" ,
956- "{} bits" ,
957- get_physical_address_bits( )
958- ) ;
959- infoentry ! ( "Linear Address Width" , "{} bits" , get_linear_address_bits ( ) ) ;
960- infoentry ! (
961- "Supports 1GiB Pages" ,
962- if supports_1gib_pages ( ) { "Yes" } else { "No" }
963- ) ;
951+ let cpu_freq = & * CPU_FREQUENCY ;
952+ let speedstep = & FEATURES . cpu_speedstep ;
953+ infoentry ! ( "Frequency" , "{cpu_freq}" ) ;
954+ infoentry ! ( "SpeedStep Technology " , "{speedstep}" ) ;
955+
956+ infoentry ! ( "Features" , "{feature_printer}" ) ;
957+
958+ let phys_addr_bits = get_physical_address_bits ( ) ;
959+ let virt_addr_bits = get_linear_address_bits ( ) ;
960+ let size_1gib_pages = if supports_1gib_pages ( ) { "Yes" } else { "No" } ;
961+ infoentry ! ( "Physical Address Width" , "{phys_addr_bits} bits" ) ;
962+ infoentry ! ( "Linear Address Width" , "{virt_addr_bits} bits" ) ;
963+ infoentry ! ( "Supports 1GiB Pages" , "{size_1gib_pages}" ) ;
964+
964965 infofooter ! ( ) ;
965966}
966967
0 commit comments