Finding the maximum number in a 2D vector
Normally, I start by walking through the code and improving it step-by-step, but this time I'll start with one piece of advice and showing my final solution. Read the Iterator docs and commit the method names and a rough idea of what they do to memory!

let max = world.iter().flat_map(|r| {
    let r = r.borrow();
    r.iter().map(|unit| unit.tiles.len()).max()
}).max();





Instead of matching, seeing if something is a Some, then unwrapping it, just bind the pattern to a variable:

match max {
    None =&gt; max_row(vec),
    Some(old_max) =&gt; {
        match max_row(vec) {
            None =&gt; Some(old_max),
            Some(new_max) =&gt; {
                if old_max &lt; new_max {
                    Some(new_max)
                } else {
                    Some(old_max)
                }
            }
        }
    }
}

Extract that max_row call to before the match, since it's done unconditionally.
Getting a default from an Option is a common pattern: Option::unwrap_or and Option::unwrap_or_else. Converting an Option&lt;T&gt; to another Option&lt;U&gt; , but only if it's Some, is also a common pattern: Option::map and Option::and_then. You should also memorize what capabilities Option and Result have.

let mr = max_row(vec);
max.map(|old_max| {
    match mr {
        None =&gt; Some(old_max),
        Some(new_max) =&gt; {
            if old_max &lt; new_max {
                Some(new_max)
            } else {
                Some(old_max)
            }
        }
    }
}).unwrap_or(mr)

Repeat.

max.map(|old_max| {
    mr.map(|new_max| {
        if old_max &lt; new_max {
            Some(new_max)
        } else {
            Some(old_max)
        }
    }).unwrap_or(Some(old_max))
}).unwrap_or(mr)

map(F).unwrap_or(D) is also a common pattern: Option::map_or:

max.map_or(mr, |old_max| {
    mr.map_or(Some(old_max), |new_max| {
        if old_max &lt; new_max {
            Some(new_max)
        } else {
            Some(old_max)
        }
    })
})

I don't know how to incrementally get out of this code. One possibility is to switch to a match statement to try and flatten some of the cases:

match (max, max_row(vec)) {
    (None, new_max) =&gt; new_max,
    (Some(old_max), None) =&gt; Some(old_max),
    (Some(old_max), Some(new_max)) =&gt; {
        if new_max &gt; old_max {
            Some(new_max)
        } else {
            Some(old_max)
        }
    }
}

std::cmp::max exists, so I'd use that:

match (max, max_row(vec)) {
    (None, new_max) =&gt; new_max,
    (Some(old_max), None) =&gt; Some(old_max),
    (Some(old_max), Some(new_max)) =&gt; Some(cmp::max(new_max, old_max)),
}

Again, I don't know a way to incrementally get from here to iterator methods. This is why I encourage everyone to memorize what functions exist so that you can read the iterator documentation when you know there's something that solves a problem.