This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/hello/print.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
31 days | |
Alice, this is Bob, Bob this is Alice | |
the quick brown fox jumps over the lazy dog | |
1 of 10 people know binary, the other half don't | |
[ 1] | |
[1 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/hello/print/print_debug.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
12 months in a year | |
"Christian" "Slater" is the "actor's" name. | |
Now Structure(3) will print! | |
Now Deep(Structure(3)) will print! | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/custom_types/structs.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
point coordinates: (0.3, 0.4) | |
Rectangle { p1: Point { x: 0.4, y: 0.3 }, p2: Point { x: 0.3, y: 0.4 } } | |
pair 1 and 0.1 | |
pair contains 1 and 0.1 | |
Area of rect:4.0 | |
New rectangle:Rectangle { p1: Point { x: 1.0, y: 1.0 }, p2: Point { x: 5.0, y: 5.0 } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko httpshttps://hanbum.gitbooks.io/rustbyexample/content/custom_types/enum.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
Has a height of 18 | |
Has a weight of 10 | |
Dave is 72 tall! | |
Is a scientist! | |
Is an engineer! | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/custom_types/enum/enum_use.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
The poor have no money.. | |
Civilians work! | |
*/ | |
// 사용하지 않는 코드 때문에 생성되는 경고를 숨기는 속성 | |
#![allow(dead_code)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/custom_types/enum/c_like.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
running 1 test | |
test tests::number ... ok | |
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/custom_types/enum/testcase_linked_list.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
running 1 test | |
test tests::test_list ... ok | |
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/custom_types/constants.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
running 1 test | |
test tests::const_test ... ok | |
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/std/str.html | |
compiled on https://play.rust-lang.org/ | |
I need more pracetice in rust string | |
result: | |
Pangram: the quick brown fox jumps over the lazy dog | |
Words in reverse | |
->dog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The rust by example ko https://hanbum.gitbooks.io/rustbyexample/content/primitives/array.html | |
compiled on https://play.rust-lang.org/ | |
result: | |
Standard Error | |
Compiling playground v0.0.1 (/playground) | |
Finished dev [unoptimized + debuginfo] target(s) in 1.09s | |
Running `target/debug/playground` | |
thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 5', src/main.rs:17:34 |