Day 1

It’s December 1st, and Santa has finally agreed to modernize the North Pole’s tech stack. The elves were buzzing with excitement; it was time to say goodbye to decades of duct-taped Python scripts and Java relics. Bernard, had convinced Santa that Rust was the way forward. Fast, memory-safe, and perfect for gift logistics—what could go wrong?

But Santa wasn’t buying it… yet.

"Rust? You? Don’t make me laugh, Bernard," Santa said, leaning back in his chair. "You couldn’t write a Rust program if your life depended on it. Heck, I bet you can’t even print ‘Hello, world!’ without the compiler screaming at you."

Bernard adjusted his elf-sized glasses, his cheeks glowing redder than Rudolph’s nose. “I can too, Santa!"

Santa crossed his arms. “Alright, hotshot. Have a look at the backlog, there is a function that needs to print a message to the console. Let's see if you can do it in Rust"


Your Task

Help Bernard prove Santa wrong! Write a function print_message that accepts a message of type String and prints in the following format:

Message: <message>

Hints

Click here for hints
  • Use the println! macro to print messages in Rust.
pub fn print_message(message: String) {
    println!("Message: {}", message);
}