Rust Beginner: flatten nested matches
Welcome to Rust!
Code Formatting
There are some inconsistencies in your formatting — I have run
cargo fmt to get rid of them.
Naming
There's no need to prefix everything with My or my_ — in
Rust, your names won't as easily clash with existing names as might be
the case in certain other languages.
Error handling
For applications, I suggest using the anyhow crate to manage
errors — it reduces much of the boilerplate.  Just add
anyhow = &quot;1.0&quot;

to the [dependencies] section of your Cargo.toml.
Helper functions
The my_read_line function can be simplified with the ? operator:
use anyhow::Result;

fn read_line() -&gt; Result&lt;String&gt; {
    let mut input = String::new();
    io::stdin().read_line(&amp;mut input)?;
    Ok(input)
}

my_read_u32_line can be similarly simplified:
fn read_u32() -&gt; Result&lt;u32&gt; {
    Ok(read_line()?.trim().parse()?)
}

Magic numbers
We can define constants for the range of the number:
const MIN: u32 = 1;
const MAX: u32 = 100;

// later
let secret_number = rand::thread_rng().gen_range(MIN, MAX + 1);

Organization
I might reorganize the main function to reduce indentation:
loop {
    println!(&quot;Please input your guess.&quot;);

    let guess = match read_u32() {
        Ok(guess) =&gt; guess,
        Err(_) =&gt; {
            println!(
                &quot;Sorry I couldn't read a u32 from your input! \
                Please try again.&quot;
            );
            continue;
        }
    };

    match guess.cmp(&amp;secret_number) {
        Ordering::Less =&gt; println!(&quot;Too small!&quot;),
        Ordering::Greater =&gt; println!(&quot;Too big!&quot;),
        Ordering::Equal =&gt; {
            println!(&quot;You win!&quot;);
            break;
        }
    };
}

Final result
use anyhow::Result;
use rand::Rng;
use std::cmp::Ordering;
use std::io;

const MIN: u32 = 1;
const MAX: u32 = 100;

fn read_line() -&gt; Result&lt;String&gt; {
    let mut input = String::new();
    io::stdin().read_line(&amp;mut input)?;
    Ok(input)
}

fn read_u32() -&gt; Result&lt;u32&gt; {
    Ok(read_line()?.trim().parse()?)
}

fn main() {
    println!(&quot;Guess the number!&quot;);

    let secret_number = rand::thread_rng().gen_range(MIN, MAX + 1);

    loop {
        println!(&quot;Please input your guess.&quot;);

        let guess = match read_u32() {
            Ok(guess) =&gt; guess,
            Err(_) =&gt; {
                println!(
                    &quot;Sorry I couldn't read a u32 from your input! \
                    Please try again.&quot;
                );
                continue;
            }
        };

        match guess.cmp(&amp;secret_number) {
            Ordering::Less =&gt; println!(&quot;Too small!&quot;),
            Ordering::Greater =&gt; println!(&quot;Too big!&quot;),
            Ordering::Equal =&gt; {
                println!(&quot;You win!&quot;);
                break;
            }
        };
    }
}