@@ -192,7 +192,7 @@ impl GeoJsonFile {
192192 Err ( error) => return Err (
193193 crate :: connection:: ConnectionError :: ReadFailure {
194194 connection : self . path . to_owned ( ) ,
195- message : format ! ( "{: } - {:}" , time , error ) ,
195+ message : format ! ( "{time } - {error}" ) ,
196196 } ,
197197 ) ,
198198 }
@@ -283,39 +283,6 @@ impl GeoJsonFile {
283283 }
284284}
285285
286- #[ cfg( test) ]
287- mod tests {
288- use super :: * ;
289-
290- #[ test]
291- #[ ignore]
292- fn test_aprs_from_url ( ) {
293- let url = "http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-11%20raw.txt"
294- . to_string ( ) ;
295-
296- let connection = AprsTextFile :: new ( url, None ) . unwrap ( ) ;
297-
298- let packets = connection. read_aprs_from_file ( ) . unwrap ( ) ;
299-
300- assert ! ( !packets. is_empty( ) ) ;
301- }
302-
303- #[ test]
304- fn test_aprs_from_file ( ) {
305- let path = format ! (
306- "{:}/{:}" ,
307- env!( "CARGO_MANIFEST_DIR" ) ,
308- "data/aprs/W3EAX-8_raw_NS-111.txt"
309- ) ;
310-
311- let connection = AprsTextFile :: new ( path, None ) . unwrap ( ) ;
312-
313- let packets = connection. read_aprs_from_file ( ) . unwrap ( ) ;
314-
315- assert ! ( !packets. is_empty( ) ) ;
316- }
317- }
318-
319286pub fn locations_geojson_featurecollection (
320287 locations : Vec < & crate :: location:: BalloonLocation > ,
321288) -> geojson:: FeatureCollection {
@@ -359,3 +326,36 @@ pub fn locations_geojson_featurecollection(
359326
360327 geojson:: FeatureCollection :: from_iter ( features)
361328}
329+
330+ #[ cfg( test) ]
331+ mod tests {
332+ use super :: * ;
333+
334+ #[ test]
335+ #[ ignore]
336+ fn test_aprs_from_url ( ) {
337+ let url = "http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-11%20raw.txt"
338+ . to_string ( ) ;
339+
340+ let connection = AprsTextFile :: new ( url, None ) . unwrap ( ) ;
341+
342+ let packets = connection. read_aprs_from_file ( ) . unwrap ( ) ;
343+
344+ assert ! ( !packets. is_empty( ) ) ;
345+ }
346+
347+ #[ test]
348+ fn test_aprs_from_file ( ) {
349+ let path = format ! (
350+ "{:}/{:}" ,
351+ env!( "CARGO_MANIFEST_DIR" ) ,
352+ "data/aprs/W3EAX-8_raw_NS-111.txt"
353+ ) ;
354+
355+ let connection = AprsTextFile :: new ( path, None ) . unwrap ( ) ;
356+
357+ let packets = connection. read_aprs_from_file ( ) . unwrap ( ) ;
358+
359+ assert ! ( !packets. is_empty( ) ) ;
360+ }
361+ }
0 commit comments