Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Clarify when graph methods return None? #491

Merged
merged 1 commit into from May 22, 2022

Conversation

beyarkay
Copy link
Contributor

This is a docs change, and should not affect any functionality.

While looking about the API, I didn't quite understand why I had to unwrap() every time I wanted to access an edge or a node. I understand now it's because that weight or node might not exist, but that was only clear to me after looking at the source code.

This change adds a line to the relevant docstrings that explain when a Some() will be returned vs when a None will be returned.

The docstring for remove_node already had a similar line in it:

/// Remove `a` from the graph if it exists, and return its weight.
/// If it doesn't exist in the graph, return `None`.

So I made sure the lines I added were phrased similarly to keep the code base consistent, like

/// If ____ doesn't exist in the graph, return `None`.

Hope this is helpful, let me know about any changes you'd like made!

This is a docs change, and should not affect any functionality.

While looking about the API, I didn't quite understand why I had to `unwrap()` every time I wanted to access an edge or a node. I understand now it's because that weight or node might not exist, but that was only clear to me after looking at the source code.

This change adds a line to the relevant docstrings that explain when a `Some()` will be returned vs when a `None` will be returned.

The docstring for `remove_node` already had a similar line in it:
```
/// Remove `a` from the graph if it exists, and return its weight.
/// If it doesn't exist in the graph, return `None`.
```
So I made sure the lines I added were phrased similarly to keep the code base consistent, like 
```
/// If ____ doesn't exist in the graph, return `None`.
```
@beyarkay
Copy link
Contributor Author

Is this repo still maintained?

@ABorgna
Copy link
Member

ABorgna commented May 22, 2022

Hi, sorry for the delay. Thanks for adding the clarifications :)

@ABorgna ABorgna merged commit 1bb6068 into petgraph:master May 22, 2022
@beyarkay
Copy link
Contributor Author

No worries! Thanks for the great project

bors bot added a commit to foresterre/cargo-msrv that referenced this pull request May 23, 2022
366: Bump petgraph from 0.6.0 to 0.6.1 r=foresterre a=dependabot[bot]

Bumps [petgraph](https://github.com/petgraph/petgraph) from 0.6.0 to 0.6.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/petgraph/petgraph/blob/master/RELEASES.rst">petgraph's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.6.1 (2022-05-22)</h1>
<ul>
<li>Added clarifications on Graph docs (<code>491</code>_).</li>
<li>Fix build errors on rust 1.41 (<code>493</code>_)</li>
</ul>
<p>.. _<code>[#491](https://github.com/petgraph/petgraph/issues/491)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/491">petgraph/petgraph#491</a>
.. _<code>[#493](https://github.com/petgraph/petgraph/issues/493)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/493">petgraph/petgraph#493</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/petgraph/petgraph/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=petgraph&package-manager=cargo&previous-version=0.6.0&new-version=0.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bors bot added a commit to andreasots/eris that referenced this pull request Jun 16, 2022
2002: build(deps): bump once_cell from 1.11.0 to 1.12.0 r=andreasots a=dependabot[bot]

Bumps [once_cell](https://github.com/matklad/once_cell) from 1.11.0 to 1.12.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/matklad/once_cell/blob/master/CHANGELOG.md">once_cell's changelog</a>.</em></p>
<blockquote>
<h2>1.12.0</h2>
<ul>
<li>Add <code>OnceCell::wait</code>, a blocking variant of <code>get</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/matklad/once_cell/commit/9879c77ea0cb36091cdba71c426776dbe116fdf7"><code>9879c77</code></a> Merge <a href="https://github-redirect.dependabot.com/matklad/once_cell/issues/179">#179</a></li>
<li><a href="https://github.com/matklad/once_cell/commit/9f43e04e7c0bd22cf3c3fd87169aca37e3d7683f"><code>9f43e04</code></a> publish v1.12.0</li>
<li><a href="https://github.com/matklad/once_cell/commit/62b4579811cea5520adda7fe27a5aecb8f23b3ad"><code>62b4579</code></a> Merge <a href="https://github-redirect.dependabot.com/matklad/once_cell/issues/177">#177</a></li>
<li><a href="https://github.com/matklad/once_cell/commit/c9351549eec6c1c37e64590bef57c363bdb34691"><code>c935154</code></a> add OnceCell::wait</li>
<li>See full diff in <a href="https://github.com/matklad/once_cell/compare/v1.11.0...v1.12.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=once_cell&package-manager=cargo&previous-version=1.11.0&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2003: build(deps): bump os_str_bytes from 6.0.1 to 6.1.0 r=andreasots a=dependabot[bot]

Bumps [os_str_bytes](https://github.com/dylni/os_str_bytes) from 6.0.1 to 6.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dylni/os_str_bytes/releases">os_str_bytes's releases</a>.</em></p>
<blockquote>
<h2>6.1.0</h2>
<ul>
<li>Added support for SOLID targets (<a href="https://github-redirect.dependabot.com/dylni/os_str_bytes/issues/8">#8</a>):
<ul>
<li><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/aarch64_kmc_solid_asp3/index.html">aarch64-kmc-solid_asp3</a></li>
<li><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/armv7a_kmc_solid_asp3_eabi/index.html">armv7a-kmc-solid_asp3-eabi</a></li>
<li><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/armv7a_kmc_solid_asp3_eabihf/index.html">armv7a-kmc-solid_asp3-eabihf</a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dylni/os_str_bytes/commit/98bcc41a1b7f32f86ce5af0bebe18c93efbfce67"><code>98bcc41</code></a> Bump version</li>
<li><a href="https://github.com/dylni/os_str_bytes/commit/86f6c1165a1867eaad3ca574956dcd637be392bc"><code>86f6c11</code></a> Include another tier 3 target in README</li>
<li><a href="https://github.com/dylni/os_str_bytes/commit/135d0884f3662224dcd4e4706e1af08176342894"><code>135d088</code></a> Update target triples</li>
<li><a href="https://github.com/dylni/os_str_bytes/commit/d5e8e981a07ab020abc77f95e589a8063d956155"><code>d5e8e98</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dylni/os_str_bytes/issues/8">#8</a> from solid-rs/patches/kmc-solid-add-support</li>
<li><a href="https://github.com/dylni/os_str_bytes/commit/af4026a90816c06d6e0b50061ef498f9b28e69be"><code>af4026a</code></a> Support <code>*-kmc-solid_*</code> targets</li>
<li>See full diff in <a href="https://github.com/dylni/os_str_bytes/compare/6.0.1...6.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=os_str_bytes&package-manager=cargo&previous-version=6.0.1&new-version=6.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2004: build(deps): bump hyper from 0.14.18 to 0.14.19 r=andreasots a=dependabot[bot]

Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.18 to 0.14.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/hyper/releases">hyper's releases</a>.</em></p>
<blockquote>
<h2>v0.14.19</h2>
<h2>Bug Fixes</h2>
<ul>
<li><strong>http1:</strong> fix preserving header case without enabling ffi (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2820">#2820</a>) (<a href="https://github.com/hyperium/hyper/commit/6a35c175f2b416851518b5831c2c7827d6dbd822">6a35c175</a>)</li>
<li><strong>server:</strong> don't add implicit content-length to HEAD responses (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2836">#2836</a>) (<a href="https://github.com/hyperium/hyper/commit/67b73138f110979f3c77ef7b56588f018837e592">67b73138</a>)</li>
</ul>
<h2>Features</h2>
<ul>
<li><strong>server:</strong>
<ul>
<li>add <code>Connection::http2_max_header_list_size</code> option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2828">#2828</a>) (<a href="https://github.com/hyperium/hyper/commit/a32658c1ae7f1261fa234a767df963be4fc63521">a32658c1</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2826">#2826</a>)</li>
<li>add <code>AddrStream::local_addr()</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2816">#2816</a>) (<a href="https://github.com/hyperium/hyper/commit/ffbf610b1631cabfacb20886270e3c137fa93800">ffbf610b</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2773">#2773</a>)</li>
</ul>
</li>
</ul>
<h2>Breaking Changes</h2>
<ul>
<li><strong>ffi (unstable):</strong>
<ul>
<li><code>hyper_clientconn_options_new</code> no longer sets the <code>http1_preserve_header_case</code> connection option by default.
Users should now call <code>hyper_clientconn_options_set_preserve_header_case</code> if they desire that functionality. (<a href="https://github.com/hyperium/hyper/commit/78de8914eadeab4b9a2c71a82c77b2ce33fe6c74">78de8914</a>)</li>
</ul>
</li>
</ul>
<h2>New Contributors ❤️</h2>
<ul>
<li><a href="https://github.com/SabrinaJewson"><code>`@​SabrinaJewson</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2775">hyperium/hyper#2775</a></li>
<li><a href="https://github.com/Some-Dood"><code>`@​Some-Dood</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2812">hyperium/hyper#2812</a></li>
<li><a href="https://github.com/liamwarfield"><code>`@​liamwarfield</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2798">hyperium/hyper#2798</a></li>
<li><a href="https://github.com/cuishuang"><code>`@​cuishuang</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2818">hyperium/hyper#2818</a></li>
<li><a href="https://github.com/jannes"><code>`@​jannes</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2836">hyperium/hyper#2836</a></li>
<li><a href="https://github.com/silence-coding"><code>`@​silence-coding</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2828">hyperium/hyper#2828</a></li>
<li><a href="https://github.com/nylonicious"><code>`@​nylonicious</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2762">hyperium/hyper#2762</a></li>
<li><a href="https://github.com/ryanrussell"><code>`@​ryanrussell</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/hyperium/hyper/pull/2875">hyperium/hyper#2875</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/hyper/blob/master/CHANGELOG.md">hyper's changelog</a>.</em></p>
<blockquote>
<h3>v0.14.19 (2022-05-27)</h3>
<h4>Bug Fixes</h4>
<ul>
<li><strong>http1:</strong> fix preserving header case without enabling ffi (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2820">#2820</a>) (<a href="https://github.com/hyperium/hyper/commit/6a35c175f2b416851518b5831c2c7827d6dbd822">6a35c175</a>)</li>
<li><strong>server:</strong> don't add implicit content-length to HEAD responses (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2836">#2836</a>) (<a href="https://github.com/hyperium/hyper/commit/67b73138f110979f3c77ef7b56588f018837e592">67b73138</a>)</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>server:</strong>
<ul>
<li>add <code>Connection::http2_max_header_list_size</code> option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2828">#2828</a>) (<a href="https://github.com/hyperium/hyper/commit/a32658c1ae7f1261fa234a767df963be4fc63521">a32658c1</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2826">#2826</a>)</li>
<li>add <code>AddrStream::local_addr()</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2816">#2816</a>) (<a href="https://github.com/hyperium/hyper/commit/ffbf610b1631cabfacb20886270e3c137fa93800">ffbf610b</a>, closes <a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2773">#2773</a>)</li>
</ul>
</li>
</ul>
<h4>Breaking Changes</h4>
<ul>
<li><strong>ffi (unstable):</strong>
<ul>
<li><code>hyper_clientconn_options_new</code> no longer sets the <code>http1_preserve_header_case</code> connection option by default.
Users should now call <code>hyper_clientconn_options_set_preserve_header_case</code> if they desire that functionality. (<a href="https://github.com/hyperium/hyper/commit/78de8914eadeab4b9a2c71a82c77b2ce33fe6c74">78de8914</a>)</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/hyperium/hyper/commit/f8e2a831943e9a687a1b3277c806caca6e0ac8a4"><code>f8e2a83</code></a> v0.14.19</li>
<li><a href="https://github.com/hyperium/hyper/commit/a929df843ed61b18218ab0976dd8968bae43275c"><code>a929df8</code></a> docs(various): fix typos in VISION and ROADMAP (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2875">#2875</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/3a755a632df194338de3e98061dd18e0bc62aad1"><code>3a755a6</code></a> chore(lib): update <code>tokio-util</code> to <code>0.7</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2762">#2762</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/4678be9e8100d18bde26d319d8de36dee373bd2f"><code>4678be9</code></a> docs(contrib): add guide for Triaging Issues</li>
<li><a href="https://github.com/hyperium/hyper/commit/775fac114bdfb4b477f0fe62475c7c077c10a6ce"><code>775fac1</code></a> docs(lib): propose 1.0 roadmap (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2806">#2806</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/a32658c1ae7f1261fa234a767df963be4fc63521"><code>a32658c</code></a> feat(server): add <code>Connection::http2_max_header_list_size</code> option (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2828">#2828</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/67b73138f110979f3c77ef7b56588f018837e592"><code>67b7313</code></a> fix(server): don't add implicit content-length to HEAD responses (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2836">#2836</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/faf24c6ad8eee1c3d5ccc9a4d4835717b8e2903f"><code>faf24c6</code></a> refactor(http1): assorted code readability improvements in <code>h1/conn.rs</code> (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2817">#2817</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/6a35c175f2b416851518b5831c2c7827d6dbd822"><code>6a35c17</code></a> fix(http1): fix preserving header case without enabling ffi (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2820">#2820</a>)</li>
<li><a href="https://github.com/hyperium/hyper/commit/89598dfcfe3d3fb65cd3bcd50900b3c7b0ebc09a"><code>89598df</code></a> docs(lib): fix some typos (<a href="https://github-redirect.dependabot.com/hyperium/hyper/issues/2818">#2818</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/hyperium/hyper/compare/v0.14.18...v0.14.19">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hyper&package-manager=cargo&previous-version=0.14.18&new-version=0.14.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2005: build(deps): bump scheduled-thread-pool from 0.2.5 to 0.2.6 r=andreasots a=dependabot[bot]

Bumps [scheduled-thread-pool](https://github.com/sfackler/scheduled-thread-pool) from 0.2.5 to 0.2.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sfackler/scheduled-thread-pool/releases">scheduled-thread-pool's releases</a>.</em></p>
<blockquote>
<h2>v0.2.6</h2>
<ul>
<li>Upgraded parking_lot.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/sfackler/scheduled-thread-pool/commit/d34a73edf524d7dafce8d951e17d4399f7705d9a"><code>d34a73e</code></a> Release v0.2.6</li>
<li><a href="https://github.com/sfackler/scheduled-thread-pool/commit/700f8aa1e7779d9c79e24f4cb3b76e8e6561dae5"><code>700f8aa</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sfackler/scheduled-thread-pool/issues/15">#15</a> from sfackler/dependabot/cargo/parking_lot-0.12</li>
<li><a href="https://github.com/sfackler/scheduled-thread-pool/commit/522ce8c8afe0a3fb84fb42fa67b8e1a4a7d31b9f"><code>522ce8c</code></a> Update parking_lot requirement from 0.11 to 0.12</li>
<li><a href="https://github.com/sfackler/scheduled-thread-pool/commit/6d746be4f40761cf478a07dcc2262ea01edd2d0b"><code>6d746be</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sfackler/scheduled-thread-pool/issues/12">#12</a> from sfackler/dependabot/add-v2-config-file</li>
<li><a href="https://github.com/sfackler/scheduled-thread-pool/commit/721e4ddfb3cfe664ccf1bb9e10a80d75168d1229"><code>721e4dd</code></a> Upgrade to GitHub-native Dependabot</li>
<li>See full diff in <a href="https://github.com/sfackler/scheduled-thread-pool/compare/v0.2.5...v0.2.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=scheduled-thread-pool&package-manager=cargo&previous-version=0.2.5&new-version=0.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2006: build(deps): bump petgraph from 0.6.0 to 0.6.2 r=andreasots a=dependabot[bot]

Bumps [petgraph](https://github.com/petgraph/petgraph) from 0.6.0 to 0.6.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/petgraph/petgraph/blob/master/RELEASES.rst">petgraph's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.6.2 (2022-05-28)</h1>
<ul>
<li>Loosed the strict version dependency set in <code>493</code><em>, to allow users to use newer versions of indexmap  (<code>495</code></em>).</li>
</ul>
<p>.. _<code>[#495](https://github.com/petgraph/petgraph/issues/495)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/493">petgraph/petgraph#493</a></p>
<h1>Version 0.6.1 (2022-05-22)</h1>
<ul>
<li>Added clarifications on Graph docs (<code>491</code>_).</li>
<li>Fix build errors on rust 1.41 (<code>493</code>_).</li>
</ul>
<p>.. _<code>[#491](https://github.com/petgraph/petgraph/issues/491)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/491">petgraph/petgraph#491</a>
.. _<code>[#493](https://github.com/petgraph/petgraph/issues/493)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/493">petgraph/petgraph#493</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/petgraph/petgraph/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=petgraph&package-manager=cargo&previous-version=0.6.0&new-version=0.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2007: build(deps): bump indexmap from 1.8.1 to 1.8.2 r=andreasots a=dependabot[bot]

Bumps [indexmap](https://github.com/bluss/indexmap) from 1.8.1 to 1.8.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bluss/indexmap/blob/1.8.2/RELEASES.rst">indexmap's changelog</a>.</em></p>
<blockquote>
<ul>
<li>
<p>1.8.2</p>
<ul>
<li>Bump the <code>rustc-rayon</code> dependency, for compiler use only.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/bluss/indexmap/commit/84123f43f5715a02319b0bc1523c71a2d598dd19"><code>84123f4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/bluss/indexmap/issues/229">#229</a> from cuviper/1-rustc-rayon-0.4</li>
<li><a href="https://github.com/bluss/indexmap/commit/e31910b22122470b31db0a933f467edb083efd24"><code>e31910b</code></a> Enable CI on indexmap-1.x</li>
<li><a href="https://github.com/bluss/indexmap/commit/156477fcfe4cdd7002a893a951caccc7886463e3"><code>156477f</code></a> Release 1.8.2</li>
<li><a href="https://github.com/bluss/indexmap/commit/3848879fcdbc5baa42217462456ebeec2c1373b3"><code>3848879</code></a> Update rustc-rayon to 0.4</li>
<li>See full diff in <a href="https://github.com/bluss/indexmap/compare/1.8.1...1.8.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indexmap&package-manager=cargo&previous-version=1.8.1&new-version=1.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

2008: build(deps): bump flate2 from 1.0.23 to 1.0.24 r=andreasots a=dependabot[bot]

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.23 to 1.0.24.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/rust-lang/flate2-rs/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flate2&package-manager=cargo&previous-version=1.0.23&new-version=1.0.24)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
foresterre pushed a commit to foresterre/cargo-msrv that referenced this pull request Aug 1, 2022
366: Bump petgraph from 0.6.0 to 0.6.1 r=foresterre a=dependabot[bot]

Bumps [petgraph](https://github.com/petgraph/petgraph) from 0.6.0 to 0.6.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/petgraph/petgraph/blob/master/RELEASES.rst">petgraph's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.6.1 (2022-05-22)</h1>
<ul>
<li>Added clarifications on Graph docs (<code>491</code>_).</li>
<li>Fix build errors on rust 1.41 (<code>493</code>_)</li>
</ul>
<p>.. _<code>[#491](https://github.com/petgraph/petgraph/issues/491)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/491">petgraph/petgraph#491</a>
.. _<code>[#493](https://github.com/petgraph/petgraph/issues/493)</code>: <a href="https://github-redirect.dependabot.com/petgraph/petgraph/issues/493">petgraph/petgraph#493</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/petgraph/petgraph/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=petgraph&package-manager=cargo&previous-version=0.6.0&new-version=0.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@beyarkay beyarkay deleted the patch-1 branch Sep 30, 2022
teuron pushed a commit to teuron/petgraph that referenced this pull request Oct 9, 2022
This is a docs change, and should not affect any functionality.

While looking about the API, I didn't quite understand why I had to `unwrap()` every time I wanted to access an edge or a node. I understand now it's because that weight or node might not exist, but that was only clear to me after looking at the source code.

This change adds a line to the relevant docstrings that explain when a `Some()` will be returned vs when a `None` will be returned.

The docstring for `remove_node` already had a similar line in it:
```
/// Remove `a` from the graph if it exists, and return its weight.
/// If it doesn't exist in the graph, return `None`.
```
So I made sure the lines I added were phrased similarly to keep the code base consistent, like 
```
/// If ____ doesn't exist in the graph, return `None`.
```
teuron pushed a commit to teuron/petgraph that referenced this pull request Oct 9, 2022
This is a docs change, and should not affect any functionality.

While looking about the API, I didn't quite understand why I had to `unwrap()` every time I wanted to access an edge or a node. I understand now it's because that weight or node might not exist, but that was only clear to me after looking at the source code.

This change adds a line to the relevant docstrings that explain when a `Some()` will be returned vs when a `None` will be returned.

The docstring for `remove_node` already had a similar line in it:
```
/// Remove `a` from the graph if it exists, and return its weight.
/// If it doesn't exist in the graph, return `None`.
```
So I made sure the lines I added were phrased similarly to keep the code base consistent, like 
```
/// If ____ doesn't exist in the graph, return `None`.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants