🤖

【Rust】ファイルの書き出し

2022/07/23に公開
#![allow(unused)]
use std::fs::File;
use std::io::prelude::*;

fn main() -> std::io::Result<()> {
    let mut file = File::create("memo.txt")?;
    file.write_all(b"hello, world!")?;
    Ok(())
}

Discussion