Rust does not protect against race conditions, since these are mere logic errors that don't impact memory safety. This program can panic when unwrap() fails, but that's also a safe operation.
Most race conditions are prevented by Rust thanks to its "alias XOR mutable" paradigm that prevents having multiple mutable references and enforces the presence of locking or atomics. Not all, but the words "fearless concurrency" aren't meaningless either.