南有嘉鱼
MarkHoo's Blog
博客迁移测试文章
This is a testdemo.

博客已迁移到 Hugo ,至于为啥不是 Hexo ,因为它生成速度实在是太慢了!尽管它的主题很丰富。

以下是测试内容:

这是一级标题 代码

use std::io;
use rand::Rng;
use std::cmp::Ordering;

fn main() {
    println!("Guess the number!");

    let secret_number = rand::thread_rng().gen_range(1, 101);

    println!("The secret number is: {}", secret_number);

    loop {
        println!("Please input your guess:");

        let mut guess = String::new();

        io::stdin().read_line(&mut guess).expect("Failed to read line");

        let guess: u32 = match guess.trim().parse(){
            Ok(num) => num,
            Err(_) => continue,
        };

        println!("You guessed: {}",guess);


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

这是二级标题 命令

yum update

这是三级标题 图片

这是四级标题 音乐

这是五级标题 视频

上次修改於 2020-11-01