Skip to content
Snippets Groups Projects
Select Git revision
  • ffb98265fcaa2ff545b52dc4f991281759d5ce29
  • master default protected
2 results

galaxy.h

Blame
  • main.rs 493 B
    use part08::io;
    use part08::something_or_nothing::find_min;
    
    fn main() -> Result<(), String> {
        let tab = match io::read_command_line_custom_int() {
            Ok(tab) => tab,
            Err(s) => return Err(s),
        };
        println!("Among the custom ints in the list:");
        io::print_tab_custom_int(&tab);
        // There are alternatives to access fields of tuples
        let min = find_min(&tab);
        // The first field is not used therefore we can replace it with "_"
        min.print();
        Ok(())
    }