yuk1ty / learning-systems-programming-in-rust

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

3.5.1: lib::io::{LimitedReader, SectionReader} を追加し、それぞれを使って文字列の一部を標準出力に表示するプログラム #67

Closed laysakura closed 3 years ago

laysakura commented 3 years ago

対象の Issue

Refs: #13

動作確認結果

Go

プログラム: https://play.golang.org/p/gpxHDVLKjWV

Section
Example of io.Se

Rust

% cargo run --bin 3_5_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.91s
     Running `target/debug/3_5_1`
Section
Example of io.Li

(出力が ... io.Se... io.Li と異なっているのは、Goの方はLimitedReaderを使っている方でもSectionReaderを使ってる風な文字列を流用しているからです)

yuk1ty commented 3 years ago

こちらもマージします