Added extra comments.
This commit is contained in:
parent
aa5702a0a3
commit
cb88b7c3d2
@ -115,9 +115,9 @@ fn main()
|
||||
prisoners.push(prisoner_i);
|
||||
}
|
||||
|
||||
// if any prisoner has not found their number
|
||||
if !opts.json
|
||||
{
|
||||
// if any prisoner has not found their number
|
||||
if prisoners.iter().any(|i| !i.found)
|
||||
{
|
||||
println!("failure");
|
||||
@ -129,6 +129,7 @@ fn main()
|
||||
}
|
||||
else
|
||||
{
|
||||
// export data to JSON format
|
||||
let out_json = serde_json::to_string(&prisoners).unwrap();
|
||||
println!("{}", out_json);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user