Skip to content

Commit 6cf75d5

Browse files
committed
Fix typos
1 parent 67ce9b9 commit 6cf75d5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

exercises/15_traits/traits2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ trait AppendBar {
33
}
44

55
// TODO: Implement the trait `AppendBar` for a vector of strings.
6-
// `appned_bar` should push the string "Bar" into the vector.
6+
// `append_bar` should push the string "Bar" into the vector.
77

88
fn main() {
99
// You can optionally experiment here.

exercises/20_threads/threads3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl Queue {
1818

1919
fn send_tx(q: Queue, tx: mpsc::Sender<u32>) {
2020
// TODO: We want to send `tx` to both threads. But currently, it is moved
21-
// into the frist thread. How could you solve this problem?
21+
// into the first thread. How could you solve this problem?
2222
thread::spawn(move || {
2323
for val in q.first_half {
2424
println!("Sending {val:?}");

src/dev/check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ fn check_exercises(info_file: &InfoFile) -> Result<()> {
174174
fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()> {
175175
let target_dir = parse_target_dir()?;
176176
let paths = Mutex::new(hashbrown::HashSet::with_capacity(info_file.exercises.len()));
177-
let error_occured = AtomicBool::new(false);
177+
let error_occurred = AtomicBool::new(false);
178178

179179
println!("Running all solutions. This may take a while...\n");
180180
thread::scope(|s| {
@@ -188,7 +188,7 @@ fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()>
188188
.unwrap();
189189
stderr.write_all(exercise_info.name.as_bytes()).unwrap();
190190
stderr.write_all(SEPARATOR).unwrap();
191-
error_occured.store(true, atomic::Ordering::Relaxed);
191+
error_occurred.store(true, atomic::Ordering::Relaxed);
192192
};
193193

194194
let path = exercise_info.sol_path();
@@ -213,7 +213,7 @@ fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()>
213213
}
214214
});
215215

216-
if error_occured.load(atomic::Ordering::Relaxed) {
216+
if error_occurred.load(atomic::Ordering::Relaxed) {
217217
bail!("At least one solution failed. See the output above.");
218218
}
219219

0 commit comments

Comments
 (0)