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: errors2.rs
    path of file: ./repos/rust-course/assets/rustlings-zh/exercises/error_handling
    
    the code of the file until where you have to start completion: // errors2.rs
// 假设我们正在编写一个游戏，你可以用代币购买物品。
// 所有物品的价格都是 5 个代币，每当你购买物品时，都
    
pub fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> {
    let processing_fee = 1;
    let cost_per_item = 5;
    let qty = item_quantity.parse::<i32>();

    Ok(qty * cost_per_item + processing_fee)
}