@@ -236,15 +236,6 @@ fn upgrade_footprint(footprint_path: &Path) -> Result<()> {
236236 . run ( )
237237}
238238
239- fn embed_step_in_footprint (
240- footprint_content : String ,
241- step_bytes : Vec < u8 > ,
242- step_filename : & str ,
243- ) -> Result < String > {
244- pcb_sexpr:: board:: embed_step_in_footprint ( footprint_content, step_bytes, step_filename)
245- . map_err ( |e| anyhow:: anyhow!( e) )
246- }
247-
248239/// Embed a STEP file into a footprint file, writing the result atomically.
249240/// Optionally deletes the standalone STEP file after embedding.
250241fn embed_step_into_footprint_file (
@@ -260,7 +251,9 @@ fn embed_step_into_footprint_file(
260251 . and_then ( |n| n. to_str ( ) )
261252 . unwrap_or ( "model.step" ) ;
262253
263- let embedded_content = embed_step_in_footprint ( footprint_content, step_bytes, step_filename) ?;
254+ let embedded_content =
255+ pcb_sexpr:: board:: embed_step_in_footprint ( footprint_content, step_bytes, step_filename)
256+ . map_err ( |e| anyhow:: anyhow!( e) ) ?;
264257
265258 // Normalize line endings and write to temporary file
266259 let normalized_content = embedded_content. replace ( "\r \n " , "\n " ) ;
@@ -1565,8 +1558,12 @@ mod tests {
15651558 )
15661559)"# ;
15671560 let step_data = b"STEP DATA HERE" . to_vec ( ) ;
1568- let result =
1569- embed_step_in_footprint ( footprint. to_string ( ) , step_data, "test.step" ) . unwrap ( ) ;
1561+ let result = pcb_sexpr:: board:: embed_step_in_footprint (
1562+ footprint. to_string ( ) ,
1563+ step_data,
1564+ "test.step" ,
1565+ )
1566+ . unwrap ( ) ;
15701567
15711568 // Verify balanced parentheses
15721569 assert_eq ! (
@@ -1600,7 +1597,9 @@ mod tests {
16001597 )
16011598)"# ;
16021599 let step_data = b"NEW STEP DATA" . to_vec ( ) ;
1603- let result = embed_step_in_footprint ( footprint. to_string ( ) , step_data, "new.step" ) . unwrap ( ) ;
1600+ let result =
1601+ pcb_sexpr:: board:: embed_step_in_footprint ( footprint. to_string ( ) , step_data, "new.step" )
1602+ . unwrap ( ) ;
16041603
16051604 // Verify the transforms were preserved
16061605 assert ! ( result. contains( "(xyz 1 2 3)" ) ) ;
0 commit comments