Skip to content
Snippets Groups Projects
Select Git revision
  • 5594196a8dd97e39cad3e5003910aec6b9c378ef
  • main default protected
  • update_2024
  • fix_formatting
4 results

main.rs

Blame
  • Forked from orestis.malaspin / rust-101
    Source project has a limited visibility.
    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(())
    }