fn from_osrm(reader: &mut BufReader<&File>) -> Edge {
        let source = reader.read_u32::<LittleEndian>().unwrap() as i64;
        let target = reader.read_u32::<LittleEndian>().unwrap() as i64;
        let _ = reader.seek(SeekFrom::Current(4));
        let weight = reader.read_u32::<LittleEndian>().unwrap();
        let _ = reader.seek(SeekFrom::Current(8));

        Edge {
            source: source,
            target: target,
            weight: weight as f32,
            highway_tag: "".to_string(),
        }
    }
/// Reads an edge from an OSRM file.
Reads an edge from an OSRM file.
Reads an edge from an OSRM file .
fn from_osrm(reader: &mut BufReader<&File>) -> Edge {
        let source = reader.read_u32::<LittleEndian>().unwrap() as i64;
        let target = reader.read_u32::<LittleEndian>().unwrap() as i64;
        let _ = reader.seek(SeekFrom::Current(4));
        let weight = reader.read_u32::<LittleEndian>().unwrap();
        let _ = reader.seek(SeekFrom::Current(8));
        Edge {
            source: source,
            target: target,
            weight: weight as f32,
            highway_tag: "".to_string(),
        }
    }
fn from_osrm ( reader : & mut BufReader < & File > ) -> Edge { let source = reader . read_u32 :: < LittleEndian > ( ) . unwrap ( ) as i64 ; let target = reader . read_u32 :: < LittleEndian > ( ) . unwrap ( ) as i64 ; let _ = reader . seek ( SeekFrom :: Current ( 4 ) ) ; let weight = reader . read_u32 :: < LittleEndian > ( ) . unwrap ( ) ; let _ = reader . seek ( SeekFrom :: Current ( 8 ) ) ; Edge { source : source , target : target , weight : weight as f32 , highway_tag : " " . to_string ( ) , } }
Reads an edge from an OSRM file.
Reads an edge from an OSRM file .
reader
&mut BufReader<&File>
reader
&mut BufReader<&File>