Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dfyz committed Mar 7, 2021
1 parent 3ca2205 commit 0ef1338
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/geodata/reader.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::coords::Coords;
use crate::tile;
use byteorder::{ByteOrder, LittleEndian, ReadBytesExt};
use anyhow::{Context, Result};
use byteorder::{ByteOrder, LittleEndian, ReadBytesExt};
use memmap::{Mmap, MmapOptions};
use owning_ref::OwningHandle;
use std::cmp::Ordering;
Expand Down
8 changes: 2 additions & 6 deletions src/geodata/saver.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::geodata::importer::{EntityStorages, Multipolygon, Polygon, RawNode, RawRefs, RawWay};
use crate::tile;
use byteorder::{LittleEndian, WriteBytesExt};
use anyhow::{bail, Result};
use byteorder::{LittleEndian, WriteBytesExt};
use std::cmp::{max, min};
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::io::Write;
Expand Down Expand Up @@ -80,11 +80,7 @@ fn save_polygons(writer: &mut dyn Write, polygons: &[Polygon], data: &mut Buffer
Ok(())
}

fn save_multipolygons(
writer: &mut dyn Write,
multipolygons: &[Multipolygon],
data: &mut BufferedData,
) -> Result<()> {
fn save_multipolygons(writer: &mut dyn Write, multipolygons: &[Multipolygon], data: &mut BufferedData) -> Result<()> {
writer.write_u32::<LittleEndian>(to_u32_safe(multipolygons.len())?)?;
for multipolygon in multipolygons {
writer.write_u64::<LittleEndian>(multipolygon.global_id)?;
Expand Down

0 comments on commit 0ef1338

Please sign in to comment.