Skip to content

Commit ff7ab33

Browse files
authored
Rollup merge of rust-lang#58107 - Centril:libgraphviz-2018, r=oli-obk
libgraphviz => 2018 Transitions `libgraphviz` to Rust 2018; cc rust-lang#58099 r? @oli-obk
2 parents 06c9fe9 + 7f41ed6 commit ff7ab33

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/libgraphviz/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["The Rust Project Developers"]
33
name = "graphviz"
44
version = "0.0.0"
5+
edition = "2018"
56

67
[lib]
78
name = "graphviz"

src/libgraphviz/lib.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,11 @@
276276
html_root_url = "https://doc.rust-lang.org/nightly/",
277277
test(attr(allow(unused_variables), deny(warnings))))]
278278

279-
#![feature(nll)]
279+
#![deny(rust_2018_idioms)]
280+
280281
#![feature(str_escape)]
281282

282-
use self::LabelText::*;
283+
use LabelText::*;
283284

284285
use std::borrow::Cow;
285286
use std::io::prelude::*;
@@ -548,12 +549,12 @@ impl<'a> LabelText<'a> {
548549
}
549550

550551
/// Puts `prefix` on a line above this label, with a blank line separator.
551-
pub fn prefix_line(self, prefix: LabelText) -> LabelText<'static> {
552+
pub fn prefix_line(self, prefix: LabelText<'_>) -> LabelText<'static> {
552553
prefix.suffix_line(self)
553554
}
554555

555556
/// Puts `suffix` on a line below this label, with a blank line separator.
556-
pub fn suffix_line(self, suffix: LabelText) -> LabelText<'static> {
557+
pub fn suffix_line(self, suffix: LabelText<'_>) -> LabelText<'static> {
557558
let mut prefix = self.pre_escaped_content().into_owned();
558559
let suffix = suffix.pre_escaped_content();
559560
prefix.push_str(r"\n\n");
@@ -686,7 +687,7 @@ pub fn render_opts<'a, N, E, G, W>(g: &'a G,
686687

687688
#[cfg(test)]
688689
mod tests {
689-
use self::NodeLabels::*;
690+
use NodeLabels::*;
690691
use super::{Id, Labeller, Nodes, Edges, GraphWalk, render, Style};
691692
use super::LabelText::{self, LabelStr, EscStr, HtmlStr};
692693
use std::io;

0 commit comments

Comments
 (0)