Skip to content

Commit 4e48005

Browse files
bors[bot]jonasbb
andauthored
Merge #19
19: Cleanup some oversights while migrating to the newer petgraph r=jonasbb a=jonasbb * Use 2018 edition * Make version-sync a dev dependency to remove unnecessary dependencies Co-authored-by: Jonas Bushart <jonas@bushart.org>
2 parents 2c438b9 + 9488ca5 commit 4e48005

File tree

6 files changed

+20
-25
lines changed

6 files changed

+20
-25
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
## [2.0.1] - 2020-02-04
11+
12+
### Changed
13+
14+
* Change to use 2018 edition
15+
* Make version-sync only a dev dependency
16+
1017
## [2.0.0] - 2020-02-03
1118

1219
### Added
@@ -17,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1724

1825
### Changed
1926

20-
* The MSRV is not 1.31
27+
* The MSRV is now 1.31
2128

2229
## [1.0.2] - 2018-05-15
2330

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "petgraph-graphml"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["jonasbb"]
55

66
description = "GraphML output support for petgraph"
@@ -9,6 +9,7 @@ repository = "https://github.com/jonasbb/petgraph-graphml"
99
readme = "README.md"
1010
keywords = ["graphml", "petgraph"]
1111
license = "MIT OR Apache-2.0"
12+
edition = "2018"
1213

1314
exclude = [
1415
".github",
@@ -23,5 +24,7 @@ maintenance = { status = "passively-maintained" }
2324

2425
[dependencies]
2526
petgraph = "0.5.0"
26-
version-sync = "0.8.1"
2727
xml-rs = "0.8.0"
28+
29+
[dev-dependencies]
30+
version-sync = "0.8.1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add this to your `Cargo.toml`:
1717

1818
```toml
1919
[dependencies]
20-
petgraph-graphml = "2.0.0"
20+
petgraph-graphml = "2.0.1"
2121
```
2222

2323
## Example

src/lib.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
//!
1616
//! ```toml
1717
//! [dependencies]
18-
//! petgraph-graphml = "2.0.0"
18+
//! petgraph-graphml = "2.0.1"
1919
//! ```
2020
//!
2121
//! # Example
2222
//!
2323
//! For a simple graph like ![Graph with three nodes and two edges](https://github.com/jonasbb/petgraph-graphml/tree/master/doc/graph.png) this is the generated GraphML output.
2424
//!
2525
//! ```
26-
//! # extern crate petgraph;
27-
//! # extern crate petgraph_graphml;
2826
//! # use petgraph::Graph;
2927
//! # use petgraph_graphml::GraphMl;
3028
//! # fn make_graph() -> Graph<u32, ()> {
@@ -85,10 +83,7 @@
8583
unused_qualifications,
8684
variant_size_differences
8785
)]
88-
#![doc(html_root_url = "https://docs.rs/petgraph-graphml/2.0.0")]
89-
90-
extern crate petgraph;
91-
extern crate xml;
86+
#![doc(html_root_url = "https://docs.rs/petgraph-graphml/2.0.1")]
9287

9388
use petgraph::visit::{
9489
EdgeRef, GraphProp, IntoEdgeReferences, IntoNodeReferences, NodeIndexable, NodeRef,
@@ -201,8 +196,6 @@ where
201196
/// It will create two attributes "str attr" and "int attr" containing the string and integer part.
202197
///
203198
/// ```
204-
/// # extern crate petgraph;
205-
/// # extern crate petgraph_graphml;
206199
/// # use petgraph::Graph;
207200
/// # use petgraph_graphml::GraphMl;
208201
/// # fn make_graph() -> Graph<(), (String, u32)> {
@@ -255,8 +248,6 @@ where
255248
/// It will create two attributes "str attr" and "int attr" containing the string and integer part.
256249
///
257250
/// ```
258-
/// # extern crate petgraph;
259-
/// # extern crate petgraph_graphml;
260251
/// # use petgraph::Graph;
261252
/// # use petgraph_graphml::GraphMl;
262253
/// # fn make_graph() -> Graph<(String, u32), ()> {
@@ -413,7 +404,7 @@ where
413404
G: IntoEdgeReferences,
414405
G: IntoNodeReferences,
415406
{
416-
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
407+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
417408
f.debug_struct("GraphMl")
418409
.field("graph", &self.graph)
419410
.field("pretty_print", &self.pretty_print)

tests/graphml.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
extern crate petgraph;
2-
extern crate petgraph_graphml;
3-
41
use petgraph::graph::Graph;
52
use petgraph_graphml::GraphMl;
63

tests/version_numbers.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
#[macro_use]
2-
extern crate version_sync;
3-
41
#[test]
52
fn test_readme_deps() {
6-
assert_markdown_deps_updated!("README.md");
3+
version_sync::assert_markdown_deps_updated!("README.md");
74
}
85

96
#[test]
107
fn test_readme_deps_in_lib() {
11-
assert_contains_regex!("src/lib.rs", r#"^//! petgraph-graphml = "{version}""#);
8+
version_sync::assert_contains_regex!("src/lib.rs", r#"^//! petgraph-graphml = "{version}""#);
129
}
1310

1411
#[test]
1512
fn test_html_root_url() {
16-
assert_html_root_url_updated!("src/lib.rs");
13+
version_sync::assert_html_root_url_updated!("src/lib.rs");
1714
}

0 commit comments

Comments
 (0)