mirror of
				https://github.com/NotAShelf/microfetch.git
				synced 2025-11-04 07:32:20 +00:00 
			
		
		
		
	refactor: remove duplicate .to_string()
This commit is contained in:
		
					parent
					
						
							
								407d98f3fa
							
						
					
				
			
			
				commit
				
					
						e2f19140cf
					
				
			
		
					 1 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -21,11 +21,7 @@ pub fn get_os_pretty_name() -> Result<String, io::Error> {
 | 
			
		|||
    let pretty_name = os_release_content
 | 
			
		||||
        .lines()
 | 
			
		||||
        .find(|line| line.starts_with("PRETTY_NAME="))
 | 
			
		||||
        .map(|line| {
 | 
			
		||||
            line.trim_start_matches("PRETTY_NAME=")
 | 
			
		||||
                .trim_matches('"')
 | 
			
		||||
                .to_string()
 | 
			
		||||
        });
 | 
			
		||||
        .map(|line| line.trim_start_matches("PRETTY_NAME=").trim_matches('"'));
 | 
			
		||||
 | 
			
		||||
    Ok(pretty_name.unwrap_or("Unknown".to_string()))
 | 
			
		||||
    Ok(pretty_name.unwrap_or("Unknown").to_string())
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue