From: Ian Jackson Date: Tue, 23 Mar 2021 22:48:52 +0000 (+0000) Subject: hidden: recalculate_occultation_general: tidy argument order X-Git-Tag: otter-0.5.0~490 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bd55d42473223adebdfc31ad3b987fad790c8121;p=otter.git hidden: recalculate_occultation_general: tidy argument order Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index ba212c12..64af9af0 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -338,9 +338,9 @@ fn recalculate_occultation_general< // to_permute: &mut ToPermute, piece: PieceId, // if no change, we return ret_vanilla() - log_invisible: LD, ret_vanilla: VF, - // otherwise we maybe call log_callback(who_by, old, new, desc) + // otherwise we use log_invisible or log_callback(who_by,old,new,desc) + log_invisible: LD, log_callback: LF, // and then call ret_callback(, ) ret_callback: RF, @@ -561,8 +561,8 @@ pub fn recalculate_occultation_piece( &mut gs.gen.unique_gen(), &gs.players, &mut gs.pieces, &mut gs.occults, ipieces, ioccults, to_permute, piece, - vec![ ], || (vanilla_wrc, vanilla_op, vanilla_log).into(), + vec![], |old, new, Html(show)| vec![ LogEntry { html: Html(format!( "{} {}", &who_by.0, @@ -598,9 +598,8 @@ fn recalculate_occultation_ofmany( gen, gplayers, gpieces, goccults, ipieces, ioccults, to_permute, ppiece, - (), ||(), - |_,_,_|(), + (), |_,_,_|(), |puo_pp, ()|{ updates.push((ppiece, PUOs::PerPlayer(puo_pp))); },