mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Merge pull request #518 from Scott169/master
Fix typos and uneditable practices
This commit is contained in:
@ -287,7 +287,7 @@ fn main() {
|
|||||||
|
|
||||||
11. 🌟🌟
|
11. 🌟🌟
|
||||||
|
|
||||||
```rust
|
```rust,editable
|
||||||
/* Fill in the blanks */
|
/* Fill in the blanks */
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
fn main() {
|
fn main() {
|
||||||
@ -305,7 +305,7 @@ fn main() {
|
|||||||
|
|
||||||
12. 🌟🌟
|
12. 🌟🌟
|
||||||
|
|
||||||
```rust
|
```rust,editable
|
||||||
/* Fill in the blanks */
|
/* Fill in the blanks */
|
||||||
#[derive(PartialEq, Debug)]
|
#[derive(PartialEq, Debug)]
|
||||||
struct Shoe {
|
struct Shoe {
|
||||||
|
@ -39,7 +39,7 @@ mod front_of_house {
|
|||||||
|
|
||||||
2. 🌟🌟 让我们在库包的根中定义一个函数 `eat_at_restaurant`, 然后在该函数中调用之前创建的函数 `eat_at_restaurant`
|
2. 🌟🌟 让我们在库包的根中定义一个函数 `eat_at_restaurant`, 然后在该函数中调用之前创建的函数 `eat_at_restaurant`
|
||||||
|
|
||||||
```rust
|
```rust,editable
|
||||||
// in lib.rs
|
// in lib.rs
|
||||||
|
|
||||||
// 填空并修复错误
|
// 填空并修复错误
|
||||||
@ -192,4 +192,4 @@ fn main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/crate-module/module.md)找到答案(在 solutions 路径下)
|
> 你可以在[这里](https://github.com/sunface/rust-by-practice/blob/master/solutions/crate-module/module.md)找到答案(在 solutions 路径下)
|
||||||
|
@ -42,7 +42,7 @@ fn main() {
|
|||||||
|
|
||||||
|
|
||||||
```rust,editable
|
```rust,editable
|
||||||
/* 像上面的示例一样,为 `r` 和 `x` 标准生命周期,然后从生命周期的角度. */
|
/* 像上面的示例一样,为 `r` 和 `x` 标注生命周期,然后从生命周期的角度. */
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user