diff --git a/rustdoc/game/app/struct.App.html b/rustdoc/game/app/struct.App.html index f7d17eebb2..4c05a88a17 100644 --- a/rustdoc/game/app/struct.App.html +++ b/rustdoc/game/app/struct.App.html @@ -47,11 +47,11 @@ the event and immediately apply the transition. call this to handle all other events. Read more

Called when something on the panel has been clicked.

Called when the mouse has moved.

-

Called when something on the panel has been clicked. Since the action is just a string, +

Called when something on the panel has been clicked. Since the action is just a string, the fallback case can just use unreachable!(). Read more

-

Called when something on the panel has changed. If a transition is returned, stop handling +

Called when something on the panel has changed. If a transition is returned, stop handling the event and immediately apply the transition. Read more

-

Called when something on the panel has been clicked.

+

Called when something on the panel has been clicked.

Called when the mouse has moved.

If a panel on_click event didn’t occur and panel_changed didn’t return transition, then call this to handle all other events. Read more

diff --git a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html index a0c6607f5b..82b56fc7c8 100644 --- a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html +++ b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html @@ -1,4 +1,4 @@ -BUILT_TIME_UTC in game::pregame::built_info - Rust

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = r"Fri, 17 Sep 2021 19:42:31 +0000";
Expand description

The build time in RFC2822, UTC.

+BUILT_TIME_UTC in game::pregame::built_info - Rust

Constant game::pregame::built_info::BUILT_TIME_UTC[][src]

pub const BUILT_TIME_UTC: &str = r"Fri, 17 Sep 2021 19:44:47 +0000";
Expand description

The build time in RFC2822, UTC.

\ No newline at end of file diff --git a/rustdoc/game/ungap/route/index.html b/rustdoc/game/ungap/route/index.html index 97ecdd821d..1c850984dc 100644 --- a/rustdoc/game/ungap/route/index.html +++ b/rustdoc/game/ungap/route/index.html @@ -1,4 +1,4 @@ -game::ungap::route - Rust

Module game::ungap::route[][src]

Structs

+game::ungap::route - Rust

Module game::ungap::route[][src]

Structs

Save sequences of waypoints as named routes. Basic file management – save, load, browse. This is useful to define “test cases,” then edit the bike network and “run the tests” to compare results.

diff --git a/rustdoc/game/ungap/route/struct.RenameEdits.html b/rustdoc/game/ungap/route/struct.RenameEdits.html index 39462155dc..fc55815f69 100644 --- a/rustdoc/game/ungap/route/struct.RenameEdits.html +++ b/rustdoc/game/ungap/route/struct.RenameEdits.html @@ -1,11 +1,11 @@ -RenameEdits in game::ungap::route - Rust

Struct game::ungap::route::RenameEdits[][src]

struct RenameEdits {
+RenameEdits in game::ungap::route - Rust

Struct game::ungap::route::RenameEdits[][src]

struct RenameEdits {
     current_name: String,
     all_names: HashSet<String>,
-}

Fields

current_name: Stringall_names: HashSet<String>

Implementations

Trait Implementations

Called when something on the panel has been clicked. Since the action is just a string, +}

Fields

current_name: Stringall_names: HashSet<String>

Implementations

Trait Implementations

Called when something on the panel has been clicked. Since the action is just a string, the fallback case can just use unreachable!(). Read more

-

Called when something on the panel has changed. If a transition is returned, stop handling +

Called when something on the panel has changed. If a transition is returned, stop handling the event and immediately apply the transition. Read more

-

Called when something on the panel has been clicked.

+

Called when something on the panel has been clicked.

Called when the mouse has moved.

If a panel on_click event didn’t occur and panel_changed didn’t return transition, then call this to handle all other events. Read more

diff --git a/rustdoc/game/ungap/route/struct.RouteManagement.html b/rustdoc/game/ungap/route/struct.RouteManagement.html index ebd08a702e..37c2c952dc 100644 --- a/rustdoc/game/ungap/route/struct.RouteManagement.html +++ b/rustdoc/game/ungap/route/struct.RouteManagement.html @@ -4,7 +4,7 @@ }
Expand description

Save sequences of waypoints as named routes. Basic file management – save, load, browse. This is useful to define “test cases,” then edit the bike network and “run the tests” to compare results.

-

Fields

current: NamedRouteall: SavedRoutes

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Fields

current: NamedRouteall: SavedRoutes

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can diff --git a/rustdoc/game/ungap/route/struct.SavedRoutes.html b/rustdoc/game/ungap/route/struct.SavedRoutes.html index 9e2e08cbb7..a2b776280e 100644 --- a/rustdoc/game/ungap/route/struct.SavedRoutes.html +++ b/rustdoc/game/ungap/route/struct.SavedRoutes.html @@ -1,6 +1,6 @@ SavedRoutes in game::ungap::route - Rust

Struct game::ungap::route::SavedRoutes[][src]

struct SavedRoutes {
     routes: BTreeMap<String, NamedRoute>,
-}

Fields

routes: BTreeMap<String, NamedRoute>

Implementations

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

+}

Fields

routes: BTreeMap<String, NamedRoute>

Implementations

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html index 0101b86e02..60cb5e76af 100644 --- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html +++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html @@ -175,7 +175,7 @@ pub const RUSTDOC_VERSION: &str = r"rustdoc 1.55.0 (c8dfcfe04 2021-09-06)"; #[doc=r#"The build time in RFC2822, UTC."#] #[allow(dead_code)] -pub const BUILT_TIME_UTC: &str = r"Fri, 17 Sep 2021 19:42:31 +0000"; +pub const BUILT_TIME_UTC: &str = r"Fri, 17 Sep 2021 19:44:47 +0000"; #[doc=r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#] #[allow(dead_code)] pub const CFG_TARGET_ARCH: &str = r"x86_64"; diff --git a/rustdoc/src/game/ungap/route.rs.html b/rustdoc/src/game/ungap/route.rs.html index bfcb775853..779d3f8ccd 100644 --- a/rustdoc/src/game/ungap/route.rs.html +++ b/rustdoc/src/game/ungap/route.rs.html @@ -729,6 +729,15 @@ 729 730 731 +732 +733 +734 +735 +736 +737 +738 +739 +740
 use std::collections::{BTreeMap, HashSet};
 
@@ -1219,16 +1228,25 @@
     }
 
     fn prev(&self, current: &str) -> Option<&NamedRoute> {
-        self.routes
-            .range(..current.to_string())
-            .next_back()
-            .map(|pair| pair.1)
+        // Pretend unsaved routes are at the end of the list
+        if self.routes.contains_key(current) {
+            self.routes
+                .range(..current.to_string())
+                .next_back()
+                .map(|pair| pair.1)
+        } else {
+            self.routes.values().last()
+        }
     }
 
     fn next(&self, current: &str) -> Option<&NamedRoute> {
-        let mut iter = self.routes.range(current.to_string()..);
-        iter.next();
-        iter.next().map(|pair| pair.1)
+        if self.routes.contains_key(current) {
+            let mut iter = self.routes.range(current.to_string()..);
+            iter.next();
+            iter.next().map(|pair| pair.1)
+        } else {
+            None
+        }
     }
 
     fn new_name(&self) -> String {