File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2727 storage : get_root_disk_usage ( ) ?,
2828 colors : print_dots ( ) ,
2929 } ;
30- print_system_info ( & fields) ;
30+ print_system_info ( & fields) ? ;
3131 }
3232
3333 Ok ( ( ) )
@@ -49,7 +49,7 @@ struct Fields {
4949 colors : String ,
5050}
5151
52- fn print_system_info ( fields : & Fields ) {
52+ fn print_system_info ( fields : & Fields ) -> Result < ( ) , Box < dyn std :: error :: Error > > {
5353 use crate :: colors:: COLORS ;
5454
5555 let Fields {
@@ -78,7 +78,5 @@ fn print_system_info(fields: &Fields) {
7878 {blue} ▝ {cyan}▟█▜█▖{blue}▀▀▀▀▀██▛▀▀▘ {cyan} {blue}Storage (/){reset} {storage}
7979 {cyan} ▟█▘ ▜█▖ {blue}▝█▛ {cyan} {blue}Colors{reset} {colors}\n " ) ;
8080
81- stdout ( )
82- . write_all ( system_info. as_bytes ( ) )
83- . expect ( "Failed to write to stdout" ) ;
81+ Ok ( stdout ( ) . write_all ( system_info. as_bytes ( ) ) ?)
8482}
You can’t perform that action at this time.
0 commit comments