You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 0198-house-robber.rs
    path of file: ./repos/NeetCode-Solutions/13_1-D_Dynamic_Programming/03_House_Robber
    
    the code of the file until where you have to start completion: /*
Problem: LeetCode 198 - House Robber

Key Idea:
The key idea is to use dynamic programming to find the maximum amount of money that can be robbed without alerting the police.

Approach:
    
    pub fn rob(nums: Vec<i32>) -> i32 {
        let (mut prev, mut curr) = (0, 0);

        for &num in nums.iter() {
            let temp = curr;
            curr = curr.max(prev + num);
            prev = temp;
        }

        curr
    }