Skip to content

Latest commit

ย 

History

History
115 lines (86 loc) ยท 4.81 KB

File metadata and controls

115 lines (86 loc) ยท 4.81 KB

๋Ÿฌ์ŠคํŠธ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๊ธฐ

๋ชฉ์ฐจ

์ฑ… ์†Œ๊ฐœ

  • ์—…๋ฐ์ดํŠธ 20250105: "๋ถ€๋ก: Cargo ์‚ฌ์šฉ ๋ฐฉ๋ฒ•" ์ฑ•ํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์—…๋ฐ์ดํŠธ 20250130: "๋ถ€๋ก: ํ† ์ด ํ”„๋กœ์ ํŠธ - ์‹œ๋ฆฌ์–ผ๋ฒˆํ˜ธ ์ƒ์„ฑ๊ธฐ ํ”„๋กœ์ ํŠธ" ์ฑ•ํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์—…๋ฐ์ดํŠธ 20250430: "์Šค๋งˆํŠธ ํฌ์ธํ„ฐ - ์Šค๋งˆํŠธํ•˜์ง€ ์•Š์€ Raw Pointer" ์ฑ•ํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์—…๋ฐ์ดํŠธ 20250503: "11. ์“ฐ๋ ˆ๋“œ" ์ฑ•ํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์—…๋ฐ์ดํŠธ 20250506: "12. ๋น„๋™๊ธฐ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ ๊ธฐ๋ณธ ๊ฐœ๋…" ์ฑ•ํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฏธ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์กฐ๊ธˆ ํ•ด๋ณด์‹  ๋ถ„๋“ค์„ ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ ๊ธฐ๋ณธ์ ์ธ ๋ฌธ๋ฒ•๋“ค์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ์„ค๋ช…ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. for๋ฃจํ”„๊ฐ€ ๋ญ”์ง€ if๊ฐ€ ๋ญ”์ง€ ๋“ฑ์„ ์„ค๋ช…ํ•˜์ง€์•Š๊ณ  ๋ฐ”๋กœ Rust์—์„œ๋Š” ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค๋กœ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

์ฒ˜์Œ ๊ธ€์„ ์จ๋ณด๋Š” ๊ฒƒ์ด๋ผ ๊ธ€ ์ž์ฒด๋„ ๋ถ€์กฑํ•˜๊ณ  ๊ธฐ์ˆ ์ ์ธ ์˜ค๋ฅ˜๋„ ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. Issue๋‚˜ Pull request๋กœ ์•Œ๋ ค์ฃผ์‹œ๋ฉด, ์ตœ๋Œ€ํ•œ ๋ณด์™„ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

์˜ˆ์ œ ์‹คํ–‰ ๋ฐฉ๋ฒ•

Cargo.tomlํŒŒ์ผ์— ๊ฐ ์˜ˆ์ œ์˜ ์‹คํ–‰ ํŒŒ์ผ์„ ๋นŒ๋“œํ•˜๋Š” ์„ค์ •์ด ์žˆ์Šต๋‹ˆ๋‹ค.

[[bin]]
name = "function_for"
path = "src/function_for/main.rs"

๋‹ค์Œ๊ณผ ๊ฐ™์ด cargo๋ฅผ ์ด์šฉํ•ด์„œ ๋นŒ๋“œํ•˜๊ณ  ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

gurugio@AL01945427:~/my-rust-book$ cargo build --bin function_for
   Compiling my-rust-book v0.1.0 (/home/gurugio/my-rust-book)
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
gurugio@AL01945427:~/my-rust-book$ cargo run --bin function_for
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/function_for`
Hello, function_for!
3 - Fizz
5 - Buzz
6 - Fizz
9 - Fizz
10 - Buzz

์—ฐ์Šต๋ฌธ์ œ ์‹คํ–‰ ๋ฐฉ๋ฒ•

texts ๋””๋ ‰ํ† ๋ฆฌ์— ํ‹ˆ๋‚˜๋Š”๋Œ€๋กœ ์—ฐ์Šต๋ฌธ์ œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

tests/functional_closure_nocapture.rs ํŒŒ์ผ์— ์žˆ๋Š” test_functional_closure_nocapture ์—ฐ์Šต๋ฌธ์ œ ์‹คํ–‰ํ•˜๊ธฐ

% cargo test --test functional_closure_nocapture 
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s
     Running tests/functional_closure_nocapture.rs (target/debug/deps/functional_closure_nocapture-f131d74e44a09c8b)

running 1 test
test test_functional_closure_nocapture ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

License

์ด ์ฑ…์˜ ์ปจํ…์ธ ์™€ ์˜ˆ์ œ ์ฝ”๋“œ๋Š” ๋‹ค์Œ ๋ผ์ด์„ ์Šค๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.

This project is distributed under the following licenses:

  • The code samples and free-standing Cargo projects contained within this book are licensed under the terms of both the MIT License and the Apache License v2.0.
  • The written prose contained within this book is licensed under the terms of the Creative Commons CC-BY-SA v4.0 license.

Copies of the licenses used by this project may also be found here:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Code of Conduct

Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the Resources team, promises to intervene to uphold that code of conduct.