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: 0045-jump-game-ii.rs
    path of file: ./repos/NeetCode-Solutions/15_Greedy/03_Jump_Game_II
    
    the code of the file until where you have to start completion: /*
Problem: LeetCode 45 - Jump Game II

Key Idea:
The key idea is to use
    
    pub fn jump(nums: Vec<i32>) -> i32 {
        let mut max_reach = 0;
        let mut end = 0;
        let mut jumps = 0;

        for i in 0..nums.len() - 1 {
            max_reach = max_reach.max(i + nums[i] as usize);

            if i == end {
                end = max_reach;
                jumps += 1;
            }
        }

        jumps
    }