🎨 improve format code

This commit is contained in:
breayhing 2024-07-11 20:45:27 +08:00
parent ad121ddad9
commit f2443ccf5f
2 changed files with 4 additions and 6 deletions

View File

@ -188,12 +188,6 @@ bin = [
{ name = "try_from_into_sol", path = "../solutions/23_conversions/try_from_into.rs" }, { name = "try_from_into_sol", path = "../solutions/23_conversions/try_from_into.rs" },
{ name = "as_ref_mut", path = "../exercises/23_conversions/as_ref_mut.rs" }, { name = "as_ref_mut", path = "../exercises/23_conversions/as_ref_mut.rs" },
{ name = "as_ref_mut_sol", path = "../solutions/23_conversions/as_ref_mut.rs" }, { name = "as_ref_mut_sol", path = "../solutions/23_conversions/as_ref_mut.rs" },
{ name = "async1", path = "../exercises/24_async/async1.rs" },
{ name = "async1_sol", path = "../solutions/24_async/async1.rs" },
{ name = "async2", path = "../exercises/24_async/async2.rs" },
{ name = "async2_sol", path = "../solutions/24_async/async2.rs" },
{ name = "async3", path = "../exercises/24_async/async3.rs" },
{ name = "async3_sol", path = "../solutions/24_async/async3.rs" },
] ]
[package] [package]

View File

@ -3,15 +3,19 @@
In modern software development, handling multiple operations at once is crucial for performance and responsiveness. Rust facilitates this through asynchronous programming, allowing your code to perform non-blocking operations efficiently. This chapter explores the key aspects of async programming in Rust. In modern software development, handling multiple operations at once is crucial for performance and responsiveness. Rust facilitates this through asynchronous programming, allowing your code to perform non-blocking operations efficiently. This chapter explores the key aspects of async programming in Rust.
## Introduction to Async ## Introduction to Async
Discover the basics of asynchronous programming by writing your first async function. Understand how futures work and the differences between sync and async code. Discover the basics of asynchronous programming by writing your first async function. Understand how futures work and the differences between sync and async code.
## Using Async and Await ## Using Async and Await
Convert a traditional synchronous function to use async/await syntax. This exercise helps illustrate the benefits and usage of Rusts async constructs. Convert a traditional synchronous function to use async/await syntax. This exercise helps illustrate the benefits and usage of Rusts async constructs.
## Error Handling in Async ## Error Handling in Async
Navigate the complexities of error handling in async code. Understand how errors propagate differently in async workflows and how to handle them effectively. Navigate the complexities of error handling in async code. Understand how errors propagate differently in async workflows and how to handle them effectively.
## Further Information ## Further Information
- [Learn more about async programming in Rust](https://doc.rust-lang.org/book/ch16-00-concurrency.html) - [Learn more about async programming in Rust](https://doc.rust-lang.org/book/ch16-00-concurrency.html)
- [Deep dive into handling concurrency](https://doc.rust-lang.org/book/ch16-02-message-passing.html) - [Deep dive into handling concurrency](https://doc.rust-lang.org/book/ch16-02-message-passing.html)
- [Advanced async patterns](https://tokio.rs/tokio/tutorial) - [Advanced async patterns](https://tokio.rs/tokio/tutorial)