@@ -11,7 +11,7 @@ fn create_test_mod_jar(
1111 mod_name : & str ,
1212 translations : Vec < ( & str , & str , & str ) > , // (lang_code, format, content)
1313) -> PathBuf {
14- let jar_path = dir. join ( format ! ( "{}-1.0.0.jar" , mod_id ) ) ;
14+ let jar_path = dir. join ( format ! ( "{mod_id }-1.0.0.jar" ) ) ;
1515 let file = File :: create ( & jar_path) . unwrap ( ) ;
1616 let mut zip = ZipWriter :: new ( file) ;
1717 let options = FileOptions :: default ( ) . compression_method ( zip:: CompressionMethod :: Deflated ) ;
@@ -21,17 +21,16 @@ fn create_test_mod_jar(
2121 let fabric_json = format ! (
2222 r#"{{
2323 "schemaVersion": 1,
24- "id": "{}",
24+ "id": "{mod_id }",
2525 "version": "1.0.0",
26- "name": "{}",
26+ "name": "{mod_name }",
2727 "description": "Test mod for translation detection",
2828 "authors": ["Test Author"],
2929 "contact": {{}},
3030 "license": "MIT",
3131 "environment": "*",
3232 "entrypoints": {{}}
33- }}"# ,
34- mod_id, mod_name
33+ }}"#
3534 ) ;
3635 zip. write_all ( fabric_json. as_bytes ( ) ) . unwrap ( ) ;
3736
@@ -43,18 +42,17 @@ loaderVersion="[40,)"
4342license="MIT"
4443
4544[[mods]]
46- modId="{}"
45+ modId="{mod_id }"
4746version="1.0.0"
48- displayName="{}"
47+ displayName="{mod_name }"
4948description="Test mod for translation detection"
50- "# ,
51- mod_id, mod_name
49+ "#
5250 ) ;
5351 zip. write_all ( mods_toml. as_bytes ( ) ) . unwrap ( ) ;
5452
5553 // Add translations
5654 for ( lang_code, format, content) in translations {
57- let path = format ! ( "assets/{}/lang/{}.{}" , mod_id , lang_code , format ) ;
55+ let path = format ! ( "assets/{mod_id }/lang/{lang_code }.{format}" ) ;
5856 zip. start_file ( & path, options) . unwrap ( ) ;
5957 zip. write_all ( content. as_bytes ( ) ) . unwrap ( ) ;
6058 }
@@ -113,10 +111,10 @@ fn test_mod_translation_detection_integration() {
113111
114112 // Print paths for manual testing
115113 println ! ( "Created test mods:" ) ;
116- println ! ( " - Mod 1 (with ja_jp.json): {:?}" , mod1_path ) ;
117- println ! ( " - Mod 2 (with ja_jp.lang): {:?}" , mod2_path ) ;
118- println ! ( " - Mod 3 (without ja_jp): {:?}" , mod3_path ) ;
119- println ! ( " - Mod 4 (with JA_JP.json): {:?}" , mod4_path ) ;
114+ println ! ( " - Mod 1 (with ja_jp.json): {mod1_path :?}" ) ;
115+ println ! ( " - Mod 2 (with ja_jp.lang): {mod2_path :?}" ) ;
116+ println ! ( " - Mod 3 (without ja_jp): {mod3_path :?}" ) ;
117+ println ! ( " - Mod 4 (with JA_JP.json): {mod4_path :?}" ) ;
120118
121119 // Verify files exist
122120 assert ! ( mod1_path. exists( ) , "Mod 1 JAR should exist" ) ;
@@ -161,11 +159,11 @@ fn test_mod_translation_detection_integration() {
161159
162160 zip. finish ( ) . unwrap ( ) ;
163161
164- println ! ( " - Mod 5 (complex structure): {:?}" , mod5_path ) ;
162+ println ! ( " - Mod 5 (complex structure): {mod5_path :?}" ) ;
165163 assert ! ( mod5_path. exists( ) , "Mod 5 JAR should exist" ) ;
166164
167165 // The actual check_mod_translation_exists calls would be made from the application
168- println ! ( "\n Test mods created successfully in: {:?}" , mods_dir ) ;
166+ println ! ( "\n Test mods created successfully in: {mods_dir :?}" ) ;
169167 println ! ( "\n Expected results when checking for ja_jp translations:" ) ;
170168 println ! ( " - testmod1: Should find translation (ja_jp.json exists)" ) ;
171169 println ! ( " - testmod2: Should find translation (ja_jp.lang exists)" ) ;
@@ -221,7 +219,7 @@ fn test_edge_cases() {
221219 zip. finish ( ) . unwrap ( ) ;
222220
223221 println ! ( "\n Edge case test mods created:" ) ;
224- println ! ( " - Empty language file: {:?}" , edge1_path ) ;
225- println ! ( " - Path separator test: {:?}" , edge2_path ) ;
226- println ! ( " - Multiple locations: {:?}" , edge3_path ) ;
222+ println ! ( " - Empty language file: {edge1_path :?}" ) ;
223+ println ! ( " - Path separator test: {edge2_path :?}" ) ;
224+ println ! ( " - Multiple locations: {edge3_path :?}" ) ;
227225}
0 commit comments