From e5b66a6464f2c9e6410d7780329abe74b142e3c1 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Thu, 23 Dec 2021 19:51:38 +0530 Subject: [PATCH 1/8] Made a paragraph easier to read Fixed a grammatical error and removed unnecessary words to make the paragraph easier to read. --- nostarch/chapter02.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nostarch/chapter02.md b/nostarch/chapter02.md index 6381bbe805..30af63402a 100644 --- a/nostarch/chapter02.md +++ b/nostarch/chapter02.md @@ -278,9 +278,9 @@ on which variant an enum value is when the conditional is evaluated. Chapter 6 will cover enums in more detail. The purpose of these `Result` types is to encode error-handling information. -`Result`’s variants are `Ok` or `Err`. The `Ok` variant indicates the -operation was successful, and inside `Ok` is the successfully generated value. -The `Err` variant means the operation failed, and `Err` contains information +`Result`’s variants are `Ok` and `Err`. The `Ok` variant indicates that the +operation was successful, and it contains the successfully generated value. +The `Err` variant means the operation failed, and it contains information about how or why the operation failed. Values of the `Result` type, like values of any type, have methods defined on From 31259f1a56792887d884c7baf1475d7dde3993af Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Fri, 24 Dec 2021 16:31:05 +0530 Subject: [PATCH 2/8] Corrected error message --- nostarch/chapter03.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter03.md b/nostarch/chapter03.md index 2a00baffe4..9292b03e47 100644 --- a/nostarch/chapter03.md +++ b/nostarch/chapter03.md @@ -76,7 +76,7 @@ isn’t safely doing what you want it to do yet; they do *not* mean that you’r not a good programmer! Experienced Rustaceans still get compiler errors. The error message indicates that the cause of the error is that you `` cannot -assign twice to immutable variable `x` ``, because you tried to assign a second +assign twice to immutable variable ``, because you tried to assign a second value to the immutable `x` variable. It’s important that we get compile-time errors when we attempt to change a From 88c84194b995ba3cbb53d3c0a983996fe2700037 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Sun, 26 Dec 2021 00:57:10 +0530 Subject: [PATCH 3/8] Fixed a grammatical error --- nostarch/chapter04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter04.md b/nostarch/chapter04.md index 8334bf1202..041f3f1590 100644 --- a/nostarch/chapter04.md +++ b/nostarch/chapter04.md @@ -95,7 +95,7 @@ strings. > data on the heap so you don’t run out of space are all problems that ownership > addresses. Once you understand ownership, you won’t need to think about the > stack and the heap very often, but knowing that the main purpose of ownership -> is to manage heap data can help explain why it works the way it does. +> is to manage heap data and can help explain why it works the way it does. ### Ownership Rules From 704858157597be78a4c00563835a04d3fc20bee7 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Sun, 26 Dec 2021 01:04:08 +0530 Subject: [PATCH 4/8] Fixed another grammatical error --- nostarch/chapter04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter04.md b/nostarch/chapter04.md index 041f3f1590..ec8aa0eb2c 100644 --- a/nostarch/chapter04.md +++ b/nostarch/chapter04.md @@ -150,7 +150,7 @@ understanding by introducing the `String` type. To illustrate the rules of ownership, we need a data type that is more complex than those we covered in the “Data Types” section of Chapter 3. The types -covered previously are all a known size, can be stored on the stack and popped +covered previously are all of a known size, can be stored on the stack and popped off the stack when their scope is over, and can be quickly and trivially copied to make a new, independent instance if another part of code needs to use the same value in a different scope. But we want to look at data that is stored on From 7653f1edbafee02d7b753870ba5c96e65bac7f49 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Mon, 27 Dec 2021 14:02:48 +0530 Subject: [PATCH 5/8] Fixed grammatical error --- nostarch/chapter02.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter02.md b/nostarch/chapter02.md index 30af63402a..09459e94d8 100644 --- a/nostarch/chapter02.md +++ b/nostarch/chapter02.md @@ -278,7 +278,7 @@ on which variant an enum value is when the conditional is evaluated. Chapter 6 will cover enums in more detail. The purpose of these `Result` types is to encode error-handling information. -`Result`’s variants are `Ok` and `Err`. The `Ok` variant indicates that the +`Result`’s variants are `Ok` and `Err`. The `Ok` variant indicates the operation was successful, and it contains the successfully generated value. The `Err` variant means the operation failed, and it contains information about how or why the operation failed. From 15d063198b93c932b1e3b9848b63c993486f2054 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Mon, 27 Dec 2021 14:03:57 +0530 Subject: [PATCH 6/8] Fixed grammatical error --- nostarch/chapter03.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter03.md b/nostarch/chapter03.md index 9292b03e47..2a00baffe4 100644 --- a/nostarch/chapter03.md +++ b/nostarch/chapter03.md @@ -76,7 +76,7 @@ isn’t safely doing what you want it to do yet; they do *not* mean that you’r not a good programmer! Experienced Rustaceans still get compiler errors. The error message indicates that the cause of the error is that you `` cannot -assign twice to immutable variable ``, because you tried to assign a second +assign twice to immutable variable `x` ``, because you tried to assign a second value to the immutable `x` variable. It’s important that we get compile-time errors when we attempt to change a From 74c9d7159fbcd1437db714cc2572afe67b5df76e Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Mon, 27 Dec 2021 14:04:40 +0530 Subject: [PATCH 7/8] Fixed grammatical error --- nostarch/chapter04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter04.md b/nostarch/chapter04.md index ec8aa0eb2c..4e429b0971 100644 --- a/nostarch/chapter04.md +++ b/nostarch/chapter04.md @@ -95,7 +95,7 @@ strings. > data on the heap so you don’t run out of space are all problems that ownership > addresses. Once you understand ownership, you won’t need to think about the > stack and the heap very often, but knowing that the main purpose of ownership -> is to manage heap data and can help explain why it works the way it does. +> is to manage heap data can help explain why it works the way it does. ### Ownership Rules From 7226d001712ec48897d1edf9318ad0479e0b0f44 Mon Sep 17 00:00:00 2001 From: Joel Jose Date: Mon, 27 Dec 2021 14:06:03 +0530 Subject: [PATCH 8/8] Fixed grammatical error --- nostarch/chapter04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostarch/chapter04.md b/nostarch/chapter04.md index 4e429b0971..8334bf1202 100644 --- a/nostarch/chapter04.md +++ b/nostarch/chapter04.md @@ -150,7 +150,7 @@ understanding by introducing the `String` type. To illustrate the rules of ownership, we need a data type that is more complex than those we covered in the “Data Types” section of Chapter 3. The types -covered previously are all of a known size, can be stored on the stack and popped +covered previously are all a known size, can be stored on the stack and popped off the stack when their scope is over, and can be quickly and trivially copied to make a new, independent instance if another part of code needs to use the same value in a different scope. But we want to look at data that is stored on