Antigua
30 points Easy

Antigua Challenge Guidelines

This is an introductory Rust programming challenge and is a great way to learn about the Rust programming language. Fix the compile errors in the provided main.rs Rust source file and the flag will be printed.

Note that there are unit tests provided that should all pass... no changes were made to the unit tests.

You will need to install the Rust tool chain to compile the source. Rust is known for very good error messages so this challenge is great way to learn a little about Rust programming.

Have fun!

main.rs
Flag
Rating 5.00
5
4
3
2
1

Discussion

0

Was able to solve after spending some time looking at Rust and carefully looking at compiler errors.

0

Anyone getting thread 'main' panicked at 'attempt to multiply with overflow', /usr/src/rustc-1.70.0/library/core/src/num/mod.rs:1071:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace after removing the compiler errors?

0

did you get all the tests to run successfully?

0

yes, you probably did what the compiler suggested (base.pow(32).into()), thats causing the panic.

0

i was so stupid.. i kept trying to compile the code and thought.. why is the code not printing anything.. are these tests failing or what.. but good one.. the code is really simple.. i saw rust for the very first time.. and i can read it.. very easy

0

It seems like someone is trying to fix his code with our hands...

2

The challenge is to learn some Rust programming by fixing the compile errors. Good Luck!

0

Hahahahaha

0