From b5319aed38e03c7cae0904655740e6c186cb428b Mon Sep 17 00:00:00 2001 From: Leynos Date: Fri, 20 Jun 2025 17:41:25 +0100 Subject: [PATCH] Fix LengthPrefixedProcessor usage in tests --- tests/routes.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/routes.rs b/tests/routes.rs index e8d45db7..8a95f2a1 100644 --- a/tests/routes.rs +++ b/tests/routes.rs @@ -30,7 +30,7 @@ async fn handler_receives_message_and_echoes_response() { let called_clone = called.clone(); let app = WireframeApp::new() .unwrap() - .frame_processor(LengthPrefixedProcessor) + .frame_processor(LengthPrefixedProcessor::default()) .route( 1, Box::new(move |_| { @@ -49,14 +49,13 @@ async fn handler_receives_message_and_echoes_response() { }; let env_bytes = BincodeSerializer.serialize(&env).unwrap(); let mut framed = BytesMut::new(); - LengthPrefixedProcessor - .encode(&env_bytes, &mut framed) - .unwrap(); + let processor = LengthPrefixedProcessor::default(); + processor.encode(&env_bytes, &mut framed).unwrap(); let out = run_app_with_frame(app, framed.to_vec()).await.unwrap(); let mut buf = BytesMut::from(&out[..]); - let frame = LengthPrefixedProcessor.decode(&mut buf).unwrap().unwrap(); + let frame = processor.decode(&mut buf).unwrap().unwrap(); let (resp_env, _) = BincodeSerializer .deserialize::(&frame) .unwrap();