mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
cleaning up redundant extern crates
This commit is contained in:
parent
3edbf30719
commit
ee90ce1ed8
1
TODO.md
1
TODO.md
@ -68,7 +68,6 @@
|
||||
|
||||
## Code cleanup
|
||||
|
||||
- where does 'extern crate' belong? only in main / mod?
|
||||
- clean up code
|
||||
- master Map struct
|
||||
- line type / ditch vec2d / settle on types
|
||||
|
@ -1,9 +1,8 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate map_model;
|
||||
extern crate osm_xml;
|
||||
|
||||
use map_model;
|
||||
use map_model::Pt2D;
|
||||
use osm_xml;
|
||||
use srtm;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fs::File;
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate byteorder;
|
||||
|
||||
use byteorder::{BigEndian, ReadBytesExt};
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
|
@ -95,9 +95,10 @@ wait slow down even more -- before any of this change, lanes on adjacent roads s
|
||||
---> option 1: module per object type, geometry and graph squished together
|
||||
- option 2: try to separate the graph/geom stuff within map model.
|
||||
- CLEANUP: no more 'extern crate' in non lib
|
||||
|
||||
|
||||
- CLEANUP: bldg front path should happen upfront, not in render
|
||||
- CLEANUP: gps to screen in map upfront, dont plumb along gps pts for bldg/parcel/etc, so bounds should become private.
|
||||
|
||||
- THEN: express the proto -> runtime map loading as a sequence of phases
|
||||
- keep doing the current road trimming for the moment
|
||||
- later, this could be the same as the OSM conversion. just
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
use colors::{ColorScheme, Colors};
|
||||
use ezgui::input::UserInput;
|
||||
use graphics::types::Color;
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
// TODO check out https://accessmap.io/ for inspiration on how to depict elevation
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
use ezgui::input::UserInput;
|
||||
use graphics::types::Color;
|
||||
use map_model::{Map, Road};
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
use colors::{ColorScheme, Colors};
|
||||
use control::ControlMap;
|
||||
use control::stop_signs::TurnPriority;
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
// TODO how to edit cycle time?
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
use colors::{ColorScheme, Colors};
|
||||
use control::ControlMap;
|
||||
use ezgui::input::UserInput;
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
// TODO problem with this approach is that turns can belong to multiple cycles
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
use control::ControlMap;
|
||||
use graphics::types::Color;
|
||||
use map_model::{Turn, TurnID};
|
||||
|
@ -1,14 +1,12 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate geo;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::geom::Rect;
|
||||
use ezgui::GfxCtx;
|
||||
use geo;
|
||||
use graphics;
|
||||
use graphics::math::Vec2d;
|
||||
use graphics::types::Color;
|
||||
use map_model;
|
||||
use map_model::geometry;
|
||||
use map_model::{Bounds, BuildingID, Map};
|
||||
use ordered_float::NotNaN;
|
||||
|
@ -1,13 +1,11 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::geom::Rect;
|
||||
use ezgui::GfxCtx;
|
||||
use graphics;
|
||||
use graphics::math::Vec2d;
|
||||
use graphics::types::Color;
|
||||
use map_model;
|
||||
use map_model::geometry;
|
||||
use map_model::{Bounds, IntersectionID, Map};
|
||||
use render::DrawRoad;
|
||||
|
@ -1,8 +1,5 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::QuadTree;
|
||||
use aabb_quadtree::geom::{Point, Rect};
|
||||
use map_model::geometry;
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate map_model;
|
||||
|
||||
mod building;
|
||||
mod intersection;
|
||||
mod map;
|
||||
|
@ -1,13 +1,11 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::geom::Rect;
|
||||
use ezgui::GfxCtx;
|
||||
use graphics;
|
||||
use graphics::math::Vec2d;
|
||||
use graphics::types::Color;
|
||||
use map_model;
|
||||
use map_model::geometry;
|
||||
use map_model::{Bounds, ParcelID, Pt2D};
|
||||
use render::PARCEL_BOUNDARY_THICKNESS;
|
||||
|
@ -1,14 +1,12 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::geom::Rect;
|
||||
use colors::{ColorScheme, Colors};
|
||||
use ezgui::GfxCtx;
|
||||
use graphics;
|
||||
use graphics::math::Vec2d;
|
||||
use graphics::types::Color;
|
||||
use map_model;
|
||||
use map_model::geometry;
|
||||
use map_model::{Pt2D, RoadID};
|
||||
use render::PARCEL_BOUNDARY_THICKNESS;
|
||||
|
@ -1,14 +1,12 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate aabb_quadtree;
|
||||
extern crate map_model;
|
||||
|
||||
use aabb_quadtree::geom::Rect;
|
||||
use colors::{ColorScheme, Colors};
|
||||
use ezgui::GfxCtx;
|
||||
use graphics;
|
||||
use graphics::math::Vec2d;
|
||||
use graphics::types::Color;
|
||||
use map_model;
|
||||
use map_model::TurnID;
|
||||
use map_model::geometry;
|
||||
use render::{BIG_ARROW_TIP_LENGTH, TURN_ICON_ARROW_LENGTH, TURN_ICON_ARROW_THICKNESS,
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
// TODO this should just be a way to handle interactions between plugins
|
||||
|
||||
extern crate map_model;
|
||||
extern crate serde;
|
||||
|
||||
use abstutil;
|
||||
use animation;
|
||||
use colors::{ColorScheme, Colors};
|
||||
@ -17,6 +14,7 @@ use ezgui::input::UserInput;
|
||||
use graphics;
|
||||
use graphics::types::Color;
|
||||
use gui;
|
||||
use map_model;
|
||||
use map_model::IntersectionID;
|
||||
use piston::input::{Key, MouseCursorEvent};
|
||||
use piston::window::Size;
|
||||
|
@ -1,8 +1,6 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
extern crate map_model;
|
||||
extern crate quick_xml;
|
||||
|
||||
use map_model;
|
||||
use quick_xml::events::Event;
|
||||
use quick_xml::reader::Reader;
|
||||
use std::fs::File;
|
||||
|
Loading…
Reference in New Issue
Block a user