Skip to content

Commit

Permalink
Merge pull request #40 from artichoke/lopopolo/example-c_char
Browse files Browse the repository at this point in the history
Lock stdout outside of the loops in the example
  • Loading branch information
lopopolo authored Mar 2, 2024
2 parents bdf66dd + c5d940e commit 1d0bae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/enumerate_system_dirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ mod platform {

let mut idx = domains.len() * search_paths.len() - 1;

let mut out = io::stdout().lock();

for (domain_mask, domain_name) in domains {
for (search_path, search_path_name) in search_paths {
let mut out = io::stdout().lock();

let mut path_count = 0;
writeln!(out, "{search_path_name} in {domain_name} domain:\n")?;
enumerate(search_path, domain_mask, |bytes| {
Expand Down

0 comments on commit 1d0bae0

Please sign in to comment.