Fix typos

This commit is contained in:
mo8it 2024-07-02 14:28:08 +02:00
parent 67ce9b9e56
commit 6cf75d569b
3 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@ trait AppendBar {
} }
// TODO: Implement the trait `AppendBar` for a vector of strings. // TODO: Implement the trait `AppendBar` for a vector of strings.
// `appned_bar` should push the string "Bar" into the vector. // `append_bar` should push the string "Bar" into the vector.
fn main() { fn main() {
// You can optionally experiment here. // You can optionally experiment here.

View file

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

View file

@ -174,7 +174,7 @@ fn check_exercises(info_file: &InfoFile) -> Result<()> {
fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()> { fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()> {
let target_dir = parse_target_dir()?; let target_dir = parse_target_dir()?;
let paths = Mutex::new(hashbrown::HashSet::with_capacity(info_file.exercises.len())); let paths = Mutex::new(hashbrown::HashSet::with_capacity(info_file.exercises.len()));
let error_occured = AtomicBool::new(false); let error_occurred = AtomicBool::new(false);
println!("Running all solutions. This may take a while...\n"); println!("Running all solutions. This may take a while...\n");
thread::scope(|s| { thread::scope(|s| {
@ -188,7 +188,7 @@ fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()>
.unwrap(); .unwrap();
stderr.write_all(exercise_info.name.as_bytes()).unwrap(); stderr.write_all(exercise_info.name.as_bytes()).unwrap();
stderr.write_all(SEPARATOR).unwrap(); stderr.write_all(SEPARATOR).unwrap();
error_occured.store(true, atomic::Ordering::Relaxed); error_occurred.store(true, atomic::Ordering::Relaxed);
}; };
let path = exercise_info.sol_path(); let path = exercise_info.sol_path();
@ -213,7 +213,7 @@ fn check_solutions(require_solutions: bool, info_file: &InfoFile) -> Result<()>
} }
}); });
if error_occured.load(atomic::Ordering::Relaxed) { if error_occurred.load(atomic::Ordering::Relaxed) {
bail!("At least one solution failed. See the output above."); bail!("At least one solution failed. See the output above.");
} }