mirror of
				https://github.com/NotAShelf/microfetch.git
				synced 2025-11-04 07:32:20 +00:00 
			
		
		
		
	perf: don't collect args into a Vec
This commit is contained in:
		
					parent
					
						
							
								9713138e94
							
						
					
				
			
			
				commit
				
					
						88c9ff5e13
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -12,8 +12,7 @@ use crate::uptime::get_current;
 | 
			
		|||
use std::io::{Write, stdout};
 | 
			
		||||
 | 
			
		||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
 | 
			
		||||
    let args: Vec<String> = std::env::args().collect();
 | 
			
		||||
    if args.len() > 1 && args[1] == "--version" {
 | 
			
		||||
    if Some("--version") == std::env::args().nth(1).as_deref() {
 | 
			
		||||
        println!("Microfetch {}", env!("CARGO_PKG_VERSION"));
 | 
			
		||||
    } else {
 | 
			
		||||
        let utsname = nix::sys::utsname::uname()?;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue