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: loading_screen.rs
    path of file: ./repos/quicksilver/examples
    
    the code of the file until where you have to start completion: // Example 6: draw a progress bar while loading the application
//
// This (pretends to) load some data when starting and in between each step (eg. each texture or
// model or whatever), it updates a progress bar.
//
// Alternatively, one could al
    
fn draw_loader(window: &Window, gfx: &mut Graphics, progress: usize, total: usize) -> Result<()> {
    gfx.clear(Color::BLACK);
    gfx.fill_rect(
        &Rectangle::new(Vector::new(50.0, 500.0), Vector::new(700.0, 25.0)),
        Color::YELLOW,
    );

    let width = 700.0 * progress as f32 / total as f32;
    gfx.fill_rect(
        &Rectangle::new(Vector::new(50.0, 500.0), Vector::new(width, 25.0)),
        Color::BLUE,
    );

    /*
     * In real game, this might be a good place to make the loading screen nicer, possibly by
     * adding an image. We stick with just the progress bar in the example for simplicity.
     */

    gfx.present(&window)?;

    Ok(())
}