yuk1ty / learning-systems-programming-in-rust

「Rustでもわかるシステムプログラミング」
433 stars 23 forks source link

3.1: `std::io::Read` を実装した何かから最大1024bytes読み込んで HEX 表示するプログラム #17

Closed laysakura closed 3 years ago

laysakura commented 3 years ago

Fixes: #7

実行結果

💻 sho.nakatani@mbp2019 📂 ~/.ghq/src/github.com/yuk1ty/learning-systems-programming-in-rust ⏰ 10:53:30
% cargo run --bin main_3_1
   Compiling chapter3 v0.1.0 (/Users/sho.nakatani/.ghq/src/github.com/yuk1ty/learning-systems-programming-in-rust/chapter3)
    Finished dev [unoptimized + debuginfo] target(s) in 0.45s
     Running `target/debug/main_3_1`
320 bytes read:
[5b, 77, 6f, 72, 6b, 73, 70, 61, 63, 65, 5d, 0a, 6d, 65, 6d, 62, 65, 72, 73, 20, 3d, 20, 5b, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 32, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 33, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 34, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 35, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 36, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 37, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 38, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 39, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 30, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 31, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 32, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 33, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 34, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 35, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 36, 22, 2c, 0a, 20, 20, 20, 20, 22, 63, 68, 61, 70, 74, 65, 72, 31, 37, 22, 2c, 0a, 20, 20, 20, 20, 22, 61, 70, 70, 65, 6e, 64, 69, 78, 22, 0a, 5d, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
laysakura commented 3 years ago

@yuk1ty 73e1658 でディレクトリ構造修正しました 📁