diff --git a/crates/improvise-command/src/ui/reduce.rs b/crates/improvise-command/src/ui/reduce.rs index bde90602..3ecb6b83 100644 --- a/crates/improvise-command/src/ui/reduce.rs +++ b/crates/improvise-command/src/ui/reduce.rs @@ -303,7 +303,14 @@ pub fn records_at_stake(app: &App, cmd: &ModelCommand) -> Vec { .resolve_record(*record) .map(|source| RecordHash::of(&source.with(category, item))) .filter(|dest| dest != record) - .filter(|dest| app.model_state.workbook.model.data.resolve_record(*dest).is_some()); + .filter(|dest| { + app.model_state + .workbook + .model + .data + .resolve_record(*dest) + .is_some() + }); records.extend(destination); } records diff --git a/crates/improvise-protocol/src/client.rs b/crates/improvise-protocol/src/client.rs index 69ad1fec..065e0da4 100644 --- a/crates/improvise-protocol/src/client.rs +++ b/crates/improvise-protocol/src/client.rs @@ -3,9 +3,8 @@ use crate::{ BasisCache, CategoryTreeCache, Command, DocumentCache, FormulaCache, GridCache, ModelCommand, - Projection, - Rejection, Snapshot, TileBarCache, ViewListCache, ViewState, WidgetCache, reduce_view, - settled_mode, + Projection, Rejection, Snapshot, TileBarCache, ViewListCache, ViewState, WidgetCache, + reduce_view, settled_mode, }; use improvise_core::model::record::RecordHash; use serde::Serialize; diff --git a/crates/improvise-wasm-client/tests/browser_round_trip.rs b/crates/improvise-wasm-client/tests/browser_round_trip.rs index d46ea514..aea0e5c6 100644 --- a/crates/improvise-wasm-client/tests/browser_round_trip.rs +++ b/crates/improvise-wasm-client/tests/browser_round_trip.rs @@ -1239,8 +1239,9 @@ fn from_another_client(host: &mut Host, a_id: Sid, a: &mut Client, cmd: ModelCom let frame = improvise_command::ui::reduce::caught_up(host.app(), cmd); let relayed = host.handle(b_id, ClientFrame::command(frame)); assert!( - relayed.iter().any(|f| f.to == b_id - && matches!(f.msg, improvise_protocol::ServerFrame::Accepted)), + relayed + .iter() + .any(|f| f.to == b_id && matches!(f.msg, improvise_protocol::ServerFrame::Accepted)), "the other client's write must land: {relayed:?}" ); let for_a: Vec = relayed.into_iter().filter(|f| f.to == a_id).collect(); @@ -1293,7 +1294,11 @@ fn a_retry_after_record_gone_renames_no_other_record() { ); press(&mut host, a_id, &mut a, "Enter"); - assert_eq!(region(&host, "Zed"), None, "the retry renamed a record never opened"); + assert_eq!( + region(&host, "Zed"), + None, + "the retry renamed a record never opened" + ); assert_eq!(region(&host, "South"), Some(CellValue::Number(2.0))); assert_eq!(region(&host, "West"), Some(CellValue::Number(3.0))); assert_eq!(region(&host, "Yak"), Some(CellValue::Number(1.0))); @@ -1356,6 +1361,10 @@ fn a_rename_onto_a_record_this_client_has_seen_still_overwrites_it() { .any(|f| matches!(f.msg, improvise_protocol::ServerFrame::Accepted)), "{answer:?}" ); - assert_eq!(region(&host, "South"), Some(CellValue::Number(1.0)), "North's value"); + assert_eq!( + region(&host, "South"), + Some(CellValue::Number(1.0)), + "North's value" + ); assert_eq!(region(&host, "North"), None); }