yuk1ty / learning-systems-programming-in-rust

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

Add 9.5.4 - 9.5.7 #94

Closed shnmorimoto closed 3 years ago

shnmorimoto commented 3 years ago

対象の Issue

60 9.5.4 - 9.5.7

9.5.7について

動作確認結果

9.5.4

Go

> go run main.go
chapter9/src/9_5_4/main.rs
/home/shnmorimoto/learning-systems-programming-in-rust/chapter9/src/9_5_4/main.rs
bin/go

Rust

> cargo run -p chapter9 --bin 9_5_4
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/9_5_4`
"chapter9/src/9_5_4/main.rs"
"/home/shnmorimoto/learning-systems-programming-in-rust/chapter9/src/9_5_4/main.rs"
"bin/go"

9.5.5

Go

> go run main.go
/home/shnmorimoto/.bashrc
/home/shnmorimoto/.bashrc

Rust

> cargo run -p chapter9 --bin 9_5_5
   Compiling chapter9 v0.1.0 (/home/shnmorimoto/Work/rust-sandbox/learning-systems-programming-in-rust/chapter9)
    Finished dev [unoptimized + debuginfo] target(s) in 0.70s
     Running `target/debug/9_5_5`
"/home/shnmorimoto/.bashrc"
"/home/shnmorimoto/.bashrc"

9.5.6

Go

> go main.go
true <nil>
[1.png 2.png]

Rust

> cargo run -p chapter9 --bin 9_5_6
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/9_5_6`
true
["1.png", "2.png"]

9.5.7

Go

> go run main.go ./
aaa.png
bbb/ccc/ddd.png
eee/fff.jpeg

Rust

> cargo run -p chapter9 --bin 9_5_7 ./
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/9_5_7 ./`
./aaa.png
./bbb/ccc/ddd.png
./eee/fff.jpeg
yuk1ty commented 3 years ago

おそくなってすみません!よさそうです!

yuk1ty commented 3 years ago

5/29 23:59 ごろまでオープンしておきます。