Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit #1397

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
4707105
Initial commit
AveNRU Aug 26, 2024
c3f0f26
Initial commit
AveNRU Aug 26, 2024
f56f8c1
обновление
AveNRU Aug 26, 2024
5a98dbf
2
AveNRU Aug 26, 2024
ed7b7d2
2 день
AveNRU Aug 27, 2024
8db288e
3
AveNRU Aug 29, 2024
06613b5
4
AveNRU Aug 29, 2024
cec9896
4
AveNRU Aug 29, 2024
aa29d49
5
AveNRU Aug 30, 2024
54cb968
5
AveNRU Aug 30, 2024
297938c
5
AveNRU Aug 30, 2024
08f129a
Merge branch 'rus2' of https://github.com/AveNRU/book into rus2
AveNRU Aug 30, 2024
d3951b8
Update .gitignore
AveNRU Aug 30, 2024
eeede08
6
AveNRU Aug 30, 2024
0c8c64f
6
AveNRU Aug 30, 2024
a826355
6
AveNRU Aug 30, 2024
7fcbf0b
Update README.md
AveNRU Aug 30, 2024
afea5b5
6
AveNRU Aug 31, 2024
19184b5
6
AveNRU Aug 31, 2024
fda90fd
6
AveNRU Aug 31, 2024
90fb1f4
6
AveNRU Aug 31, 2024
df1fb71
6
AveNRU Aug 31, 2024
1ac9b31
Update ch03-02-data-types.md
AveNRU Aug 31, 2024
85d0f1c
6
AveNRU Aug 31, 2024
8026f7c
Update заимствованные слова1.xlsx
AveNRU Aug 31, 2024
c88b08b
6
AveNRU Sep 2, 2024
1620aee
Revert "6"
AveNRU Sep 2, 2024
a5d5f5f
понедельник утро - работа
AveNRU Sep 2, 2024
4b5c396
7
AveNRU Sep 2, 2024
a261077
5
AveNRU Sep 2, 2024
9d8df55
5
AveNRU Sep 2, 2024
c18d57f
6
AveNRU Sep 2, 2024
09499d5
5
AveNRU Sep 2, 2024
dcfc9d1
6
AveNRU Sep 2, 2024
824277a
Update заимствованные слова1.xlsx
AveNRU Sep 3, 2024
2203ee9
7
AveNRU Sep 3, 2024
a25587c
6
AveNRU Sep 3, 2024
a9f71f2
6
AveNRU Sep 3, 2024
fd20d27
s
AveNRU Sep 4, 2024
72ffff2
32
AveNRU Sep 4, 2024
e93acad
5
AveNRU Sep 4, 2024
a636b8a
5
AveNRU Sep 4, 2024
08d3b90
56
AveNRU Sep 5, 2024
4f149d0
5
AveNRU Sep 5, 2024
7418d51
5
AveNRU Sep 6, 2024
43ef2ca
5
AveNRU Sep 6, 2024
a2f25bc
5
AveNRU Sep 6, 2024
e3e607b
Update ch08-02-strings.md
AveNRU Sep 6, 2024
d9166bb
6
AveNRU Sep 6, 2024
1cea52f
+
AveNRU Sep 6, 2024
fc27f89
+
AveNRU Sep 6, 2024
e22c0d7
6
AveNRU Sep 9, 2024
8111509
6
AveNRU Sep 9, 2024
498538f
6
AveNRU Sep 9, 2024
891c4e7
5
AveNRU Sep 10, 2024
fac1f31
5
AveNRU Sep 10, 2024
9076007
5
AveNRU Sep 10, 2024
123ccc8
Merge branch 'rus2' of https://github.com/AveNRU/book into rus2
AveNRU Sep 10, 2024
8d76a6f
6
AveNRU Sep 11, 2024
d966ce6
Update ch02-00-guessing-game-tutorial.md
AveNRU Sep 11, 2024
2ab19c4
5
AveNRU Sep 11, 2024
c4e153d
Update заимствованные слова1.xlsx
AveNRU Sep 11, 2024
34f1af2
6
AveNRU Sep 11, 2024
5cf9b5c
1
AveNRU Sep 11, 2024
22c42a9
5
AveNRU Sep 11, 2024
5a53d70
6
AveNRU Sep 11, 2024
859466d
5
AveNRU Sep 12, 2024
4f3bb29
5
AveNRU Sep 12, 2024
4da7a6f
5
AveNRU Sep 12, 2024
37a0385
Update ch13-02-iterators.md
AveNRU Sep 13, 2024
9a577ce
+
AveNRU Sep 16, 2024
ce93102
+
AveNRU Sep 17, 2024
047d521
+
AveNRU Sep 18, 2024
3747233
+
AveNRU Sep 18, 2024
c26e788
+
AveNRU Sep 20, 2024
f94fc3c
+
AveNRU Sep 20, 2024
1c4fc7a
+
AveNRU Sep 20, 2024
ee9a1f9
+
AveNRU Sep 23, 2024
07264b9
+
AveNRU Sep 23, 2024
0e4976f
+
AveNRU Sep 24, 2024
2f2662d
+
AveNRU Sep 24, 2024
a4b3e71
+
AveNRU Sep 25, 2024
2425f3e
+
AveNRU Sep 25, 2024
9e4d786
+
AveNRU Sep 25, 2024
00a0744
+
AveNRU Sep 26, 2024
3e6ef18
+
AveNRU Sep 26, 2024
8922d8a
+
AveNRU Sep 26, 2024
bd5f264
+
AveNRU Sep 27, 2024
91d8f70
+
AveNRU Sep 30, 2024
b9ce9ac
+
AveNRU Sep 30, 2024
1010b71
+
AveNRU Sep 30, 2024
01d7f87
+
AveNRU Sep 30, 2024
c2ebf0a
+
AveNRU Oct 1, 2024
048e053
+
AveNRU Oct 1, 2024
0d800be
+
AveNRU Oct 2, 2024
8a21696
+
AveNRU Oct 2, 2024
a4b676f
+
AveNRU Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
263 changes: 263 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added .vs/book/v17/.wsuo
Binary file not shown.
12 changes: 12 additions & 0 deletions .vs/book/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Version": 1,
"WorkspaceRootPath": "E:\\Rust\\\u043A\u043D\u0438\u0433\u0438\\book\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": []
}
]
}
Binary file added .vs/book/v17/workspaceFileList.bin
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

## Как устроен процесс перевода

Перевод происходит исключительно в системе GitLocalize. Для регистрации в системе нужно авторизоваться через аккаунт на Github. Для каждого перевода создан отдельный проект.
Список проектов можно найти [тут][books-projects].
Перевод происходит исключительно в системе GitLocalize. Для регистрации в системе нужно авторизоваться через аккаунт на Github. Для каждого перевода создан отдельный дело.
Список дел можно найти [тут][books-projects].

Процесс перевода происходит в следующих этапах:

1. Перевод файла
2. После полного перевода файла появляется кнопка "Create Review Request" для отправки на ревью
3. В течение недели корректор вычитывает перевод, правит ошибки, приводит книгу к одному стилю
4. После этого корректор отправляет Pull Request на Github
5. Модераторы перевода исправляют помарки, опечатки и технические ошибки, вызванные багами GitLocalize, и мержат перевод. После этого перевод синхронизируется с GitLocalize и появляется в системе
3. В течение недели изменитель вычитывает перевод, правит ошибки, приводит книгу к одному стилю
4. После этого изменитель отправляет Pull Request на Github
5. Писари перевода исправляют помарки, опечатки и технические ошибки, вызванные багами GitLocalize, и мержат перевод. После этого перевод синхронизируется с GitLocalize и появляется в системе

## Соглашения о процессе перевода

Expand All @@ -26,7 +26,7 @@
- Перевод должен быть в единой стилистике, которая поддерживается редактором. В [чате переводов][translations-chat] можно задать вопросы по стилистике и принести предложения по ней.

## Ресурсы
- [Список проектов и переводов][books-projects]
- [Список дел и переводов][books-projects]
- [Словарь терминов и переводов](https://github.com/rust-lang-ru/dictionary#readme)
- [Словарь для проверки орфографии](https://github.com/rust-lang-ru/common-configs/blob/master/.yaspellerrc)
- [Чат переводов][translations-chat]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## GitLocalize

Проект на GitLocalize: https://gitlocalize.com/repo/4579
Дело на GitLocalize: https://gitlocalize.com/repo/4579

## Правила участия в переводе

Expand Down
8 changes: 4 additions & 4 deletions rustbook-en/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.79 -c rust-docs
rustup default 1.79
rustup toolchain install 1.81 -c rust-docs
rustup default 1.81
- name: Install mdbook
run: |
mkdir bin
Expand All @@ -36,8 +36,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.79 -c rust-docs
rustup default 1.79
rustup toolchain install 1.81 -c rust-docs
rustup default 1.81
- name: Run `tools` package tests
run: |
cargo test
Expand Down
10 changes: 10 additions & 0 deletions rustbook-en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ rust-lang/rust uses in [this file][rust-mdbook]. To get it:
$ cargo install mdbook --locked --version <version_num>
```

The book also uses two mdbook plugins which are part of this repository. If you
do not install them, you will see warnings when building and the output will not
look right, but you *will* still be able to build the book. To use the plugins,
you should run:

```bash
$ cargo install --locked --path packages/mdbook-trpl-listing
$ cargo install --locked --path packages/mdbook-trpl-note
```

## Building

To build the book, type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
$ cargo build
Downloading crates ...
Downloaded rand_core v0.6.2
Downloaded getrandom v0.2.2
Downloaded rand_chacha v0.3.0
Downloaded ppv-lite86 v0.2.10
Downloaded libc v0.2.86
Compiling libc v0.2.86
Compiling getrandom v0.2.2
Compiling cfg-if v1.0.0
Expand All @@ -18,7 +24,7 @@ error[E0308]: mismatched types
= note: expected reference `&String`
found reference `&{integer}`
note: method defined here
--> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/cmp.rs:840:8
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/cmp.rs:839:8

For more information about this error, try `rustc --explain E0308`.
error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ error[E0384]: cannot assign twice to immutable variable `x`
--> src/main.rs:4:5
|
2 | let x = 5;
| -
| |
| first assignment to `x`
| help: consider making this binding mutable: `mut x`
| - first assignment to `x`
3 | println!("The value of x is: {x}");
4 | x = 6;
| ^^^^^ cannot assign twice to immutable variable
|
help: consider making this binding mutable
|
2 | let mut x = 5;
| +++

For more information about this error, try `rustc --explain E0384`.
error: could not compile `variables` (bin "variables") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ error[E0277]: cannot add `Option<i8>` to `i8`
|
= help: the trait `Add<Option<i8>>` is not implemented for `i8`
= help: the following other types implement trait `Add<Rhs>`:
<&'a i8 as Add<i8>>
<&i8 as Add<&i8>>
<i8 as Add<&i8>>
<i8 as Add>
`&'a i8` implements `Add<i8>`
`&i8` implements `Add<&i8>`
`i8` implements `Add<&i8>`
`i8` implements `Add`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `enums` (bin "enums") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ error[E0004]: non-exhaustive patterns: `None` not covered
| ^ pattern `None` not covered
|
note: `Option<i32>` defined here
--> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:571:1
::: /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:575:5
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:574:1
::: /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:578:5
|
= note: not covered
= note: the matched value is of type `Option<i32>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
| ^ cannot use the `?` operator in a function that returns `()`
|
= help: the trait `FromResidual<Result<Infallible, std::io::Error>>` is not implemented for `()`
help: consider adding return type
|
3 ~ fn main() -> Result<(), Box<dyn std::error::Error>> {
4 | let greeting_file = File::open("hello.txt")?;
5 +
6 + Ok(())
7 + }
|

For more information about this error, try `rustc --explain E0277`.
error: could not compile `error-handling` (bin "error-handling") due to 1 previous error
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run
Locking 1 package to latest compatible version
Adding closure-example v0.1.0 (/Users/carolnichols/rust/book/tmp/listings/ch13-functional-features/listing-13-04)
Adding closure-example v0.1.0 (/Users/chris/dev/rust-lang/book/tmp/listings/ch13-functional-features/listing-13-04)
Compiling closure-example v0.1.0 (file:///projects/closure-example)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
Running `target/debug/closure-example`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ cargo run
Locking 1 package to latest compatible version
Adding closure-example v0.1.0 (/Users/carolnichols/rust/book/tmp/listings/ch13-functional-features/listing-13-05)
Adding closure-example v0.1.0 (/Users/chris/dev/rust-lang/book/tmp/listings/ch13-functional-features/listing-13-05)
Compiling closure-example v0.1.0 (file:///projects/closure-example)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
Running `target/debug/closure-example`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ help: consider changing this to be a mutable reference in the `impl` method and
|
2 ~ fn send(&mut self, msg: &str);
3 | }
...
...
56 | impl Messenger for MockMessenger {
57 ~ fn send(&mut self, message: &str) {
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ note: required because it's used within this closure
11 | let handle = thread::spawn(move || {
| ^^^^^^^
note: required by a bound in `spawn`
--> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/mod.rs:691:1
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/thread/mod.rs:688:1

For more information about this error, try `rustc --explain E0277`.
error: could not compile `shared-state` (bin "shared-state") due to 1 previous error
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ error[E0746]: return type cannot have an unboxed trait object
1 | fn returns_closure() -> dyn Fn(i32) -> i32 {
| ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
help: return an `impl Trait` instead of a `dyn Trait`, if all returned values are the same type
help: consider returning an `impl Trait` instead of a `dyn Trait`
|
1 | fn returns_closure() -> impl Fn(i32) -> i32 {
| ~~~~
help: box the return type, and wrap all of the returned values in `Box::new`
help: alternatively, box the return type, and wrap all of the returned values in `Box::new`
|
1 ~ fn returns_closure() -> Box<dyn Fn(i32) -> i32> {
2 ~ Box::new(|x| x + 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let http_request: Vec<_> = buf_reader
.lines()
.map(|result| result.unwrap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {

// ANCHOR: here
fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let http_request: Vec<_> = buf_reader
.lines()
.map(|result| result.unwrap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {

// ANCHOR: here
fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let http_request: Vec<_> = buf_reader
.lines()
.map(|result| result.unwrap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {
// --snip--

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

if request_line == "GET / HTTP/1.1" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

if request_line == "GET / HTTP/1.1" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {
fn handle_connection(mut stream: TcpStream) {
// --snip--
// ANCHOR_END: here
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();
// ANCHOR: here

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn handle_connection(mut stream: TcpStream) {
// --snip--

// ANCHOR_END: here
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

// ANCHOR: here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
// ANCHOR_END: here

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() {
// ANCHOR_END: here

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
}

fn handle_connection(mut stream: TcpStream) {
let buf_reader = BufReader::new(&mut stream);
let buf_reader = BufReader::new(&stream);
let request_line = buf_reader.lines().next().unwrap().unwrap();

let (status_line, filename) = match &request_line[..] {
Expand Down
Loading