This commit is contained in:
dabreegster 2021-08-03 07:37:23 +00:00
parent 39ffd5ee64
commit 9de2cf60e6
14 changed files with 119 additions and 49 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in game::pregame::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Mon, 02 Aug 2021 19:14:51 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-7b2f388b02b372bc/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = r&quot;Tue, 03 Aug 2021 07:36:10 +0000&quot;;</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `edit` mod in crate `map_editor`."><meta name="keywords" content="rust, rustlang, rust-lang, edit"><title>map_editor::edit - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../map_editor/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module edit</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="edit" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="#">edit</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_editor/edit.rs.html#1-205" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../map_editor/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module edit</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="edit" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_editor</a>::<wbr><a class="mod" href="#">edit</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/map_editor/edit.rs.html#1-211" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.EditRoad.html" title="map_editor::edit::EditRoad struct">EditRoad</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_editor" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div><script src="../../main.js"></script></body></html>

View File

@ -4,11 +4,11 @@
r: <a class="struct" href="../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a>,
show_direction: Drawable,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.r" class="structfield small-section-header"><a href="#structfield.r" class="anchor field"></a><code>r: <a class="struct" href="../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a></code></span><span id="structfield.show_direction" class="structfield small-section-header"><a href="#structfield.show_direction" class="anchor field"></a><code>show_direction: Drawable</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#15-132" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub(crate) fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#16-131" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-SimpleState%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt; for <a class="struct" href="struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#134-205" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.on_click" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#135-191" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.r" class="structfield small-section-header"><a href="#structfield.r" class="anchor field"></a><code>r: <a class="struct" href="../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a></code></span><span id="structfield.show_direction" class="structfield small-section-header"><a href="#structfield.show_direction" class="anchor field"></a><code>show_direction: Drawable</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#15-138" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.new_state" class="method has-srclink"><h4 class="code-header">pub(crate) fn <a href="#method.new_state" class="fnname">new_state</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r: <a class="struct" href="../../map_model/raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;&gt;</h4><a href="#method.new_state" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#16-137" title="goto source code">[src]</a></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-SimpleState%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt; for <a class="struct" href="struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#140-211" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.on_click" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#141-197" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.other_event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.other_event" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#193-196" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.other_event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.other_event" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#199-202" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div></details><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#198-200" title="goto source code">[src]</a></div><div id="method.draw_baselayer" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#202-204" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4><a href="#method.on_click_custom" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><div id="method.draw" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../struct.App.html" title="struct map_editor::App">App</a>)</h4><a href="#method.draw" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#204-206" title="goto source code">[src]</a></div><div id="method.draw_baselayer" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer" class="anchor"></a><a class="srclink" href="../../src/map_editor/edit.rs.html#208-210" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4><a href="#method.on_click_custom" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.panel_changed" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</h4><a href="#method.panel_changed" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_mouseover" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_mouseover" class="anchor"></a></div></summary><div class='docblock'><p>Called when the mouse has moved.</p>

View File

@ -9,11 +9,11 @@
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_default" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_default" class="fnname">draw_default</a>(&amp;self, &amp;mut GfxCtx&lt;'_&gt;)</h4><a href="#method.draw_default" class="anchor"></a></div></summary><div class='docblock'><p>When DrawBaselayer::DefaultDraw is called, run this.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.free_memory" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.free_memory" class="fnname">free_memory</a>(&amp;mut self)</h4><a href="#method.free_memory" class="anchor"></a></div></summary><div class='docblock'><p>If widgetry determines the video card is low on memory, this may be called. The application
should make its best effort to delete any unused Drawables. <a href="#method.free_memory">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-SimpleState%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt; for <a class="struct" href="edit/struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#134-205" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.on_click" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#135-191" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-SimpleState%3CApp%3E" class="impl has-srclink"><h3 class="code-header in-band">impl SimpleState&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt; for <a class="struct" href="edit/struct.EditRoad.html" title="struct map_editor::edit::EditRoad">EditRoad</a></h3><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#140-211" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#tymethod.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;panel: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.on_click" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#141-197" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.other_event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="struct.App.html" title="struct map_editor::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.other_event" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#193-196" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.other_event" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="struct.App.html" title="struct map_editor::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>&gt;</h4><a href="#method.other_event" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#199-202" title="goto source code">[src]</a></div></summary><div class='docblock'><p>If a panel <code>on_click</code> event didnt occur and <code>panel_changed</code> didnt return transition, then
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div></details><div id="method.draw-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>)</h4><a href="#method.draw-1" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#198-200" title="goto source code">[src]</a></div><div id="method.draw_baselayer-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-1" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#202-204" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4><a href="#method.on_click_custom" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><div id="method.draw-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="struct.App.html" title="struct map_editor::App">App</a>)</h4><a href="#method.draw-1" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#204-206" title="goto source code">[src]</a></div><div id="method.draw_baselayer-1" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4><a href="#method.draw_baselayer-1" class="anchor"></a><a class="srclink" href="../src/map_editor/edit.rs.html#208-210" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_click_custom" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_click_custom" class="fnname">on_click_custom</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_app: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;_action: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="../abstutil/clone/trait.CloneableAny.html" title="trait abstutil::clone::CloneableAny">CloneableAny</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_panel: &amp;Panel<br>) -&gt; Transition&lt;A&gt;</h4><a href="#method.on_click_custom" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has been clicked.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.panel_changed" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.54.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</h4><a href="#method.panel_changed" class="anchor"></a></div></summary><div class='docblock'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_mouseover" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&amp;mut </a>A)</h4><a href="#method.on_mouseover" class="anchor"></a></div></summary><div class='docblock'><p>Called when the mouse has moved.</p>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `SHORT_THRESHOLD` constant in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, SHORT_THRESHOLD"><title>SHORT_THRESHOLD in map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="SHORT_THRESHOLD" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="constant" href="#">SHORT_THRESHOLD</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#209" title="goto source code">[src]</a></span></h1><pre class="rust const">const SHORT_THRESHOLD: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="SHORT_THRESHOLD" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="constant" href="#">SHORT_THRESHOLD</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#238" title="goto source code">[src]</a></span></h1><pre class="rust const">const SHORT_THRESHOLD: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `collapse_intersection` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, collapse_intersection"><title>collapse_intersection in map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="collapse_intersection" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">collapse_intersection</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#144-207" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn collapse_intersection(raw: &amp;mut <a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, i: <a class="struct" href="../../osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a>)</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="collapse_intersection" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">collapse_intersection</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#153-236" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn collapse_intersection(raw: &amp;mut <a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>, i: <a class="struct" href="../../osm/struct.NodeID.html" title="struct map_model::osm::NodeID">NodeID</a>)</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `is_cycleway` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, is_cycleway"><title>is_cycleway in map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="is_cycleway" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">is_cycleway</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#132-142" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn is_cycleway(lanes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="is_cycleway" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">is_cycleway</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#141-151" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn is_cycleway(lanes: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../objects/lane/struct.LaneSpec.html" title="struct map_model::objects::lane::LaneSpec">LaneSpec</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.bool.html">bool</a></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `should_collapse` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, should_collapse"><title>should_collapse in map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="should_collapse" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">should_collapse</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#40-128" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn should_collapse(r1: &amp;<a class="struct" href="../../raw/struct.RawRoad.html" title="struct map_model::raw::RawRoad">RawRoad</a>, r2: &amp;<a class="struct" href="../../raw/struct.RawRoad.html" title="struct map_model::raw::RawRoad">RawRoad</a>, raw: &amp;<a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="should_collapse" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">should_collapse</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#40-137" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn should_collapse(<br>&nbsp;&nbsp;&nbsp;&nbsp;r1: <a class="struct" href="../../raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;r2: <a class="struct" href="../../raw/struct.OriginalRoad.html" title="struct map_model::raw::OriginalRoad">OriginalRoad</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;raw: &amp;<a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a><br>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.41/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.unit.html">()</a>&gt;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div><script src="../../../main.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Some cycleways intersect footways with detailed curb mapping. The current rules for figuring out which walking paths also allow bikes are imperfect, so we wind up with short dead-end “stubs.” Trim those."><meta name="keywords" content="rust, rustlang, rust-lang, trim_deadends"><title>trim_deadends in map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="trim_deadends" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">trim_deadends</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#216-243" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn trim_deadends(raw: &amp;mut <a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>)</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Some cycleways intersect footways with detailed curb mapping. The current rules for figuring
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a></h2><div id="sidebar-vars" data-name="trim_deadends" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a href="index.html">collapse_intersections</a>::<wbr><a class="fn" href="#">trim_deadends</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#245-272" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn trim_deadends(raw: &amp;mut <a class="struct" href="../../raw/struct.RawMap.html" title="struct map_model::raw::RawMap">RawMap</a>)</pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Some cycleways intersect footways with detailed curb mapping. The current rules for figuring
out which walking paths also allow bikes are imperfect, so we wind up with short dead-end
“stubs.” Trim those.</p>
<p>Also do the same thing for extremely short dead-end service roads.</p>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `collapse_intersections` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, collapse_intersections"><title>map_model::make::collapse_intersections - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module collapse_intersections</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="collapse_intersections" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a class="mod" href="#">collapse_intersections</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#1-243" title="goto source code">[src]</a></span></h1><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module collapse_intersections</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="collapse_intersections" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img src="../../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">make</a>::<wbr><a class="mod" href="#">collapse_intersections</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_model/make/collapse_intersections.rs.html#1-272" title="goto source code">[src]</a></span></h1><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2>
<table><tr class="module-item"><td><a class="constant" href="constant.SHORT_THRESHOLD.html" title="map_model::make::collapse_intersections::SHORT_THRESHOLD constant">SHORT_THRESHOLD</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.collapse.html" title="map_model::make::collapse_intersections::collapse fn">collapse</a></td><td class="docblock-short"><p>Collapse degenerate intersections:</p>
</td></tr><tr class="module-item"><td><a class="fn" href="fn.collapse_intersection.html" title="map_model::make::collapse_intersections::collapse_intersection fn">collapse_intersection</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.is_cycleway.html" title="map_model::make::collapse_intersections::is_cycleway fn">is_cycleway</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.should_collapse.html" title="map_model::make::collapse_intersections::should_collapse fn">should_collapse</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.trim_deadends.html" title="map_model::make::collapse_intersections::trim_deadends fn">trim_deadends</a></td><td class="docblock-short"><p>Some cycleways intersect footways with detailed curb mapping. The current rules for figuring

File diff suppressed because one or more lines are too long

View File

@ -177,7 +177,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.54.0 (a178d0322 2021-07-26)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 02 Aug 2021 19:14:51 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Tue, 03 Aug 2021 07:36:10 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -205,6 +205,12 @@
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">ArrowCap</span>, <span class="ident">Distance</span>};
<span class="kw">use</span> <span class="ident">map_model::raw::OriginalRoad</span>;
@ -239,6 +245,12 @@
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>((<span class="ident">pl</span>, <span class="kw">_</span>)) <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_geometry</span>(<span class="ident">r</span>, <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">model</span>.<span class="ident">map</span>.<span class="ident">config</span>) {
<span class="ident">txt</span>.<span class="ident">add_line</span>(<span class="ident">Line</span>(<span class="macro">format!</span>(<span class="string">&quot;Length: {}&quot;</span>, <span class="ident">pl</span>.<span class="ident">length</span>())));
}
<span class="kw">for</span> (<span class="ident">rt</span>, <span class="ident">to</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">road</span>.<span class="ident">turn_restrictions</span> {
<span class="macro">info!</span>(<span class="string">&quot;Simple turn restriction {:?} to {}&quot;</span>, <span class="ident">rt</span>, <span class="ident">to</span>);
}
<span class="kw">for</span> (<span class="ident">via</span>, <span class="ident">to</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">road</span>.<span class="ident">complicated_turn_restrictions</span> {
<span class="macro">info!</span>(<span class="string">&quot;Complicated turn restriction via {} to {}&quot;</span>, <span class="ident">via</span>, <span class="ident">to</span>);
}
<span class="kw">let</span> <span class="ident">info</span> <span class="op">=</span> <span class="ident">txt</span>.<span class="ident">into_widget</span>(<span class="ident">ctx</span>);
<span class="kw">let</span> <span class="ident">controls</span> <span class="op">=</span> <span class="ident">Widget::col</span>(<span class="macro">vec!</span>[

View File

@ -243,6 +243,35 @@
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
</pre><pre class="rust">
<span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
@ -252,7 +281,7 @@
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::make::initial::lane_specs::get_lane_specs_ltr</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::osm::NodeID</span>;
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::raw</span>::{<span class="ident">OriginalRoad</span>, <span class="ident">RawMap</span>, <span class="ident">RawRoad</span>};
<span class="kw">use</span> <span class="kw">crate</span><span class="ident">::raw</span>::{<span class="ident">OriginalRoad</span>, <span class="ident">RawMap</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">osm</span>, <span class="ident">IntersectionType</span>, <span class="ident">LaneSpec</span>, <span class="ident">LaneType</span>};
<span class="doccomment">/// Collapse degenerate intersections:</span>
@ -265,7 +294,7 @@
<span class="kw">if</span> <span class="ident">roads</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">2</span> {
<span class="kw">continue</span>;
}
<span class="kw">match</span> <span class="ident">should_collapse</span>(<span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">roads</span>[<span class="number">0</span>]], <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">roads</span>[<span class="number">1</span>]], <span class="ident">raw</span>) {
<span class="kw">match</span> <span class="ident">should_collapse</span>(<span class="ident">roads</span>[<span class="number">0</span>], <span class="ident">roads</span>[<span class="number">1</span>], <span class="ident">raw</span>) {
<span class="prelude-val">Ok</span>(()) <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">merge</span>.<span class="ident">push</span>(<span class="kw-2">*</span><span class="ident">id</span>);
}
@ -283,22 +312,31 @@
<span class="comment">// Results look good so far.</span>
}
<span class="kw">fn</span> <span class="ident">should_collapse</span>(<span class="ident">r1</span>: <span class="kw-2">&amp;</span><span class="ident">RawRoad</span>, <span class="ident">r2</span>: <span class="kw-2">&amp;</span><span class="ident">RawRoad</span>, <span class="ident">raw</span>: <span class="kw-2">&amp;</span><span class="ident">RawMap</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">should_collapse</span>(<span class="ident">r1</span>: <span class="ident">OriginalRoad</span>, <span class="ident">r2</span>: <span class="ident">OriginalRoad</span>, <span class="ident">raw</span>: <span class="kw-2">&amp;</span><span class="ident">RawMap</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">road1</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">r1</span>];
<span class="kw">let</span> <span class="ident">road2</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">r2</span>];
<span class="comment">// Don&#39;t attempt to merge roads with these.</span>
<span class="kw">if</span> <span class="op">!</span><span class="ident">r1</span>.<span class="ident">turn_restrictions</span>.<span class="ident">is_empty</span>() <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">r1</span>.<span class="ident">complicated_turn_restrictions</span>.<span class="ident">is_empty</span>() {
<span class="kw">if</span> <span class="op">!</span><span class="ident">road1</span>.<span class="ident">turn_restrictions</span>.<span class="ident">is_empty</span>() <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">road1</span>.<span class="ident">complicated_turn_restrictions</span>.<span class="ident">is_empty</span>() {
<span class="macro">bail!</span>(<span class="string">&quot;one road has turn restrictions&quot;</span>);
}
<span class="kw">if</span> <span class="op">!</span><span class="ident">r2</span>.<span class="ident">turn_restrictions</span>.<span class="ident">is_empty</span>() <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">r2</span>.<span class="ident">complicated_turn_restrictions</span>.<span class="ident">is_empty</span>() {
<span class="kw">if</span> <span class="op">!</span><span class="ident">road2</span>.<span class="ident">turn_restrictions</span>.<span class="ident">is_empty</span>() <span class="op">|</span><span class="op">|</span> <span class="op">!</span><span class="ident">road2</span>.<span class="ident">complicated_turn_restrictions</span>.<span class="ident">is_empty</span>() {
<span class="macro">bail!</span>(<span class="string">&quot;one road has turn restrictions&quot;</span>);
}
<span class="kw">let</span> <span class="ident">lanes1</span> <span class="op">=</span> <span class="ident">get_lane_specs_ltr</span>(<span class="kw-2">&amp;</span><span class="ident">r1</span>.<span class="ident">osm_tags</span>, <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">config</span>);
<span class="kw">let</span> <span class="ident">lanes2</span> <span class="op">=</span> <span class="ident">get_lane_specs_ltr</span>(<span class="kw-2">&amp;</span><span class="ident">r2</span>.<span class="ident">osm_tags</span>, <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">config</span>);
<span class="comment">// Avoid two one-ways that point at each other. https://www.openstreetmap.org/node/440979339 is</span>
<span class="comment">// a bizarre example. These are actually blackholed, some problem with service roads.</span>
<span class="kw">if</span> <span class="ident">road1</span>.<span class="ident">osm_tags</span>.<span class="ident">is</span>(<span class="string">&quot;oneway&quot;</span>, <span class="string">&quot;yes&quot;</span>) <span class="op">&amp;&amp;</span> <span class="ident">road2</span>.<span class="ident">osm_tags</span>.<span class="ident">is</span>(<span class="string">&quot;oneway&quot;</span>, <span class="string">&quot;yes&quot;</span>) <span class="op">&amp;&amp;</span> <span class="ident">r1</span>.<span class="ident">i2</span> <span class="op">=</span><span class="op">=</span> <span class="ident">r2</span>.<span class="ident">i2</span> {
<span class="macro">bail!</span>(<span class="string">&quot;oneway roads point at each other&quot;</span>);
}
<span class="kw">let</span> <span class="ident">lanes1</span> <span class="op">=</span> <span class="ident">get_lane_specs_ltr</span>(<span class="kw-2">&amp;</span><span class="ident">road1</span>.<span class="ident">osm_tags</span>, <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">config</span>);
<span class="kw">let</span> <span class="ident">lanes2</span> <span class="op">=</span> <span class="ident">get_lane_specs_ltr</span>(<span class="kw-2">&amp;</span><span class="ident">road2</span>.<span class="ident">osm_tags</span>, <span class="kw-2">&amp;</span><span class="ident">raw</span>.<span class="ident">config</span>);
<span class="kw">if</span> <span class="ident">lanes1</span> <span class="op">!</span><span class="op">=</span> <span class="ident">lanes2</span> {
<span class="macro">bail!</span>(<span class="string">&quot;lane specs don&#39;t match&quot;</span>);
}
<span class="kw">if</span> <span class="ident">r1</span>.<span class="ident">get_zorder</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">r2</span>.<span class="ident">get_zorder</span>() {
<span class="kw">if</span> <span class="ident">road1</span>.<span class="ident">get_zorder</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">road2</span>.<span class="ident">get_zorder</span>() {
<span class="macro">bail!</span>(<span class="string">&quot;zorders don&#39;t match&quot;</span>);
}
@ -311,7 +349,7 @@
<span class="comment">// indirectly, like bridge/tunnel.</span>
<span class="comment">// TODO I get the feeling I&#39;ll end up swapping this to explicitly list tags that SHOULD block</span>
<span class="comment">// merging.</span>
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v1</span>, <span class="ident">v2</span>) <span class="kw">in</span> <span class="ident">r1</span>.<span class="ident">osm_tags</span>.<span class="ident">diff</span>(<span class="kw-2">&amp;</span><span class="ident">r2</span>.<span class="ident">osm_tags</span>) {
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v1</span>, <span class="ident">v2</span>) <span class="kw">in</span> <span class="ident">road1</span>.<span class="ident">osm_tags</span>.<span class="ident">diff</span>(<span class="kw-2">&amp;</span><span class="ident">road2</span>.<span class="ident">osm_tags</span>) {
<span class="kw">if</span> [
<span class="ident">osm::INFERRED_PARKING</span>,
<span class="ident">osm::INFERRED_SIDEWALKS</span>,
@ -353,16 +391,16 @@
<span class="comment">// TODO We could get fancier and copy values over. We&#39;d have to sometimes flip the</span>
<span class="comment">// direction.</span>
<span class="kw">if</span> <span class="ident">k</span> <span class="op">=</span><span class="op">=</span> <span class="ident">osm::ENDPT_FWD</span>
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:forward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:forward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:forward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:forward&quot;</span>)
{
<span class="kw">continue</span>;
}
<span class="kw">if</span> <span class="ident">k</span> <span class="op">=</span><span class="op">=</span> <span class="ident">osm::ENDPT_BACK</span>
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:backward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">r2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:backward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road1</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:backward&quot;</span>)
<span class="op">&amp;&amp;</span> <span class="op">!</span><span class="ident">road2</span>.<span class="ident">osm_tags</span>.<span class="ident">contains_key</span>(<span class="string">&quot;turn:lanes:backward&quot;</span>)
{
<span class="kw">continue</span>;
}
@ -393,8 +431,8 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">r1</span> <span class="op">=</span> <span class="ident">roads</span>[<span class="number">0</span>];
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">r2</span> <span class="op">=</span> <span class="ident">roads</span>[<span class="number">1</span>];
<span class="comment">// We&#39;ll keep r1&#39;s ID, so it&#39;s a little more convenient for debugging to guarantee r1 is the</span>
<span class="comment">// longer piece.</span>
<span class="comment">// We&#39;ll keep r1&#39;s way ID, so it&#39;s a little more convenient for debugging to guarantee r1 is</span>
<span class="comment">// the longer piece.</span>
<span class="kw">if</span> <span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">r1</span>].<span class="ident">length</span>() <span class="op">&lt;</span> <span class="ident">raw</span>.<span class="ident">roads</span>[<span class="kw-2">&amp;</span><span class="ident">r2</span>].<span class="ident">length</span>() {
<span class="ident">std::mem::swap</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">r1</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">r2</span>);
}
@ -442,14 +480,34 @@
<span class="comment">// When we concatenate the points, the common point will be duplicated</span>
<span class="ident">new_road</span>.<span class="ident">center_points</span>.<span class="ident">dedup</span>();
<span class="ident">raw</span>.<span class="ident">roads</span>.<span class="ident">insert</span>(
<span class="kw">let</span> <span class="ident">new_r1</span> <span class="op">=</span>
<span class="ident">OriginalRoad</span> {
<span class="ident">osm_way_id</span>: <span class="ident">r1</span>.<span class="ident">osm_way_id</span>,
<span class="ident">i1</span>: <span class="ident">new_i1</span>,
<span class="ident">i2</span>: <span class="ident">new_i2</span>,
},
};
<span class="ident">raw</span>.<span class="ident">roads</span>.<span class="ident">insert</span>(<span class="ident">new_r1</span>,
<span class="ident">new_road</span>,
);
<span class="comment">// We may need to fix up turn restrictions. r1 and r2 both become new_r1.</span>
<span class="kw">let</span> <span class="ident">rewrite</span> <span class="op">=</span> <span class="op">|</span><span class="ident">x</span>: <span class="kw-2">&amp;</span><span class="ident">OriginalRoad</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="ident">r1</span> <span class="op">|</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="ident">r2</span>;
<span class="kw">for</span> <span class="ident">road</span> <span class="kw">in</span> <span class="ident">raw</span>.<span class="ident">roads</span>.<span class="ident">values_mut</span>() {
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">id</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">road</span>.<span class="ident">turn_restrictions</span> {
<span class="kw">if</span> <span class="ident">rewrite</span>(<span class="ident">id</span>) {
<span class="kw-2">*</span><span class="ident">id</span> <span class="op">=</span> <span class="ident">new_r1</span>;
}
}
<span class="kw">for</span> (<span class="ident">id1</span>, <span class="ident">id2</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">road</span>.<span class="ident">complicated_turn_restrictions</span> {
<span class="kw">if</span> <span class="ident">rewrite</span>(<span class="ident">id1</span>) {
<span class="kw-2">*</span><span class="ident">id1</span> <span class="op">=</span> <span class="ident">new_r1</span>;
}
<span class="kw">if</span> <span class="ident">rewrite</span>(<span class="ident">id2</span>) {
<span class="kw-2">*</span><span class="ident">id2</span> <span class="op">=</span> <span class="ident">new_r1</span>;
}
}
}
}
<span class="kw">const</span> <span class="ident">SHORT_THRESHOLD</span>: <span class="ident">Distance</span> <span class="op">=</span> <span class="ident">Distance::const_meters</span>(<span class="number">10.0</span>);