Skip to content

Commit ec65990

Browse files
committed
s/boolean/Boolean/g
1 parent 1318590 commit ec65990

11 files changed

+21
-21
lines changed

second-edition/dictionary.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ BitXor
3838
Bjarne
3939
Boehm
4040
bool
41-
boolean
42-
booleans
41+
Boolean
42+
Booleans
4343
Bors
4444
BorrowMutError
4545
BuildHasher

second-edition/src/appendix-01-keywords.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ or lifetimes.
1717
* `else` - fallback for `if` and `if let` control flow constructs
1818
* `enum` - defining an enumeration
1919
* `extern` - external crate, function, and variable linkage
20-
* `false` - boolean false literal
20+
* `false` - Boolean false literal
2121
* `fn` - function definition and function pointer type
2222
* `for` - iterator loop, part of trait impl syntax, and higher-ranked lifetime
2323
syntax
@@ -39,7 +39,7 @@ or lifetimes.
3939
* `struct` - structure definition
4040
* `super` - parent module of the current module
4141
* `trait` - trait definition
42-
* `true` - boolean true literal
42+
* `true` - Boolean true literal
4343
* `type` - type alias and associated type definition
4444
* `unsafe` - denotes unsafe code, functions, traits, and implementations
4545
* `use` - import symbols into scope

second-edition/src/appendix-02-operators.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ operators, before the expression they apply to.
1818
could mutate the dereference), and produces the result of dereferencing the
1919
`&` or `&mut` borrowed pointer returned from the overload method.
2020
* `!`
21-
: Logical negation. On the boolean type, this flips between `true` and
21+
: Logical negation. On the Boolean type, this flips between `true` and
2222
`false`. On integer types, this inverts the individual bits in the
2323
two’s complement representation of the value.
2424
* `&` and `&mut`
@@ -64,7 +64,7 @@ calculation; see the `pow` method on the numeric types.
6464
Like the arithmetic operators, bitwise operators are syntactic sugar for calls
6565
to methods of built-in traits. This means bitwise operators can be overridden
6666
for user-defined types. The default meaning of the operators on standard types
67-
is given here. Bitwise `&`, `|` and `^` applied to boolean arguments are
67+
is given here. Bitwise `&`, `|` and `^` applied to Boolean arguments are
6868
equivalent to logical `&&`, `||` and `!=` evaluated in non-lazy fashion.
6969

7070
* `&`
@@ -83,9 +83,9 @@ equivalent to logical `&&`, `||` and `!=` evaluated in non-lazy fashion.
8383
: Right shift (arithmetic).
8484
Calls the `shr` method of the `std::ops::Shr` trait.
8585

86-
#### Lazy boolean operators
86+
#### Lazy Boolean Operators
8787

88-
The operators `||` and `&&` may be applied to operands of boolean type. The
88+
The operators `||` and `&&` may be applied to operands of Boolean type. The
8989
`||` operator denotes logical ‘or’, and the `&&` operator denotes logical
9090
‘and’. They differ from `|` and `&` in that the right-hand operand is only
9191
evaluated when the left-hand operand does not already determine the result of

second-edition/src/ch03-02-data-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You’ll see different type annotations as we discuss the various data types.
3636
### Scalar Types
3737

3838
A *scalar* type represents a single value. Rust has four primary scalar types:
39-
integers, floating-point numbers, booleans, and characters. You’ll likely
39+
integers, floating-point numbers, Booleans, and characters. You’ll likely
4040
recognize these from other programming languages, but let’s jump into how they
4141
work in Rust.
4242

@@ -156,8 +156,8 @@ list of all operators that Rust provides.
156156

157157
#### The Boolean Type
158158

159-
As in most other programming languages, a boolean type in Rust has two possible
160-
values: `true` and `false`. The boolean type in Rust is specified using `bool`.
159+
As in most other programming languages, a Boolean type in Rust has two possible
160+
values: `true` and `false`. The Boolean type in Rust is specified using `bool`.
161161
For example:
162162

163163
<span class="filename">Filename: src/main.rs</span>
@@ -170,7 +170,7 @@ fn main() {
170170
}
171171
```
172172

173-
The main way to consume boolean values is through conditionals, such as an `if`
173+
The main way to consume Boolean values is through conditionals, such as an `if`
174174
expression. We’ll cover how `if` expressions work in Rust in the “Control Flow”
175175
section.
176176

second-edition/src/ch03-05-control-flow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ error[E0308]: mismatched types
102102
```
103103

104104
The error indicates that Rust expected a `bool` but got an integer. Rust will
105-
not automatically try to convert non-boolean types to a boolean, unlike
105+
not automatically try to convert non-Boolean types to a Boolean, unlike
106106
languages such as Ruby and JavaScript. You must be explicit and always provide
107-
`if` with a `boolean` as its condition. If we want the `if` code block to run
107+
`if` with a Boolean as its condition. If we want the `if` code block to run
108108
only when a number is not equal to `0`, for example, we can change the `if`
109109
expression to the following:
110110

second-edition/src/ch04-01-what-is-ownership.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ be sure, but as a general rule, any group of simple scalar values can be
428428
`Copy`. Here are some of the types that are `Copy`:
429429

430430
* All the integer types, like `u32`.
431-
* The boolean type, `bool`, with values `true` and `false`.
431+
* The Boolean type, `bool`, with values `true` and `false`.
432432
* The character type, `char`.
433433
* All the floating point types, like `f64`.
434434
* Tuples, but only if they contain types that are also `Copy`. `(i32, i32)` is

second-edition/src/ch05-03-method-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ parameter will be by looking at the code that calls the method:
161161
read `rect2` (rather than write, which would mean we’d need a mutable borrow),
162162
and we want `main` to retain ownership of `rect2` so we can use it again after
163163
calling the `can_hold` method. The return value of `can_hold` will be a
164-
boolean, and the implementation will check whether the width and height of
164+
Boolean, and the implementation will check whether the width and height of
165165
`self` are both greater than the width and height of the other `Rectangle`,
166166
respectively. Let’s add the new `can_hold` method to the `impl` block from
167167
Listing 5-13, shown in Listing 5-15:

second-edition/src/ch06-02-match.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ the variants of the enum as its patterns.</span>
4343
Let’s break down the `match` in the `value_in_cents` function. First, we list
4444
the `match` keyword followed by an expression, which in this case is the value
4545
`coin`. This seems very similar to an expression used with `if`, but there’s a
46-
big difference: with `if`, the expression needs to return a boolean value.
46+
big difference: with `if`, the expression needs to return a Boolean value.
4747
Here, it can be any type. The type of `coin` in this example is the `Coin` enum
4848
that we defined in Listing 6-3.
4949

second-edition/src/ch11-01-writing-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ let’s look at some macros other than `panic!` that are useful in tests.
214214

215215
The `assert!` macro, provided by the standard library, is useful when you want
216216
to ensure that some condition in a test evaluates to `true`. We give the
217-
`assert!` macro an argument that evaluates to a boolean. If the value is
217+
`assert!` macro an argument that evaluates to a Boolean. If the value is
218218
`true`, `assert!` does nothing and the test passes. If the value is `false`,
219219
the `assert!` macro calls the `panic!` macro, which causes the test to fail.
220220
Using the `assert!` macro helps us check that our code is functioning in the
@@ -243,7 +243,7 @@ impl Rectangle {
243243
<span class="caption">Listing 11-5: Using the `Rectangle` struct and its
244244
`can_hold` method from Chapter 5</span>
245245

246-
The `can_hold` method returns a boolean, which means it’s a perfect use case
246+
The `can_hold` method returns a Boolean, which means it’s a perfect use case
247247
for the `assert!` macro. In Listing 11-6, we write a test that exercises the
248248
`can_hold` method by creating a `Rectangle` instance that has a length of 8 and
249249
a width of 7, and asserting that it can hold another `Rectangle` instance that

second-edition/src/ch12-05-working-with-environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub struct Config {
147147
}
148148
```
149149

150-
We add the `case_sensitive` field that holds a boolean. Then we need our `run`
150+
We add the `case_sensitive` field that holds a Boolean. Then we need our `run`
151151
function to check the `case_sensitive` field’s value and use that to decide
152152
whether to call the `search` function or the `search_case_insensitive` function
153153
as shown in Listing 12-22:

second-edition/src/ch13-02-iterators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ provides.
229229
Now that we’ve introduced iterators, we can demonstrate a common use of
230230
closures that capture their environment by using the `filter` iterator adapter.
231231
The `filter` method on an iterator takes a closure that takes each item from
232-
the iterator and returns a boolean. If the closure returns `true`, the value
232+
the iterator and returns a Boolean. If the closure returns `true`, the value
233233
will be included in the iterator produced by `filter`. If the closure returns
234234
`false`, the value won’t be included in the resulting iterator.
235235

0 commit comments

Comments
 (0)