Skip to content

Commit 36e1f2d

Browse files
Sawyer47alexcrichton
authored andcommitted
Get rid of few warnings in tests
1 parent dfacef5 commit 36e1f2d

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/libgraphviz/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ mod tests {
548548
from: uint, to: uint, label: &'static str
549549
}
550550

551-
fn Edge(from: uint, to: uint, label: &'static str) -> Edge {
551+
fn edge(from: uint, to: uint, label: &'static str) -> Edge {
552552
Edge { from: from, to: to, label: label }
553553
}
554554

@@ -723,7 +723,7 @@ r#"digraph single_node {
723723
fn single_edge() {
724724
let labels : Trivial = UnlabelledNodes(2);
725725
let result = test_input(LabelledGraph::new("single_edge", labels,
726-
vec!(Edge(0, 1, "E"))));
726+
vec!(edge(0, 1, "E"))));
727727
assert_eq!(result.unwrap().as_slice(),
728728
r#"digraph single_edge {
729729
N0[label="N0"];
@@ -737,7 +737,7 @@ r#"digraph single_edge {
737737
fn single_cyclic_node() {
738738
let labels : Trivial = UnlabelledNodes(1);
739739
let r = test_input(LabelledGraph::new("single_cyclic_node", labels,
740-
vec!(Edge(0, 0, "E"))));
740+
vec!(edge(0, 0, "E"))));
741741
assert_eq!(r.unwrap().as_slice(),
742742
r#"digraph single_cyclic_node {
743743
N0[label="N0"];
@@ -751,8 +751,8 @@ r#"digraph single_cyclic_node {
751751
let labels = AllNodesLabelled(vec!("{x,y}", "{x}", "{y}", "{}"));
752752
let r = test_input(LabelledGraph::new(
753753
"hasse_diagram", labels,
754-
vec!(Edge(0, 1, ""), Edge(0, 2, ""),
755-
Edge(1, 3, ""), Edge(2, 3, ""))));
754+
vec!(edge(0, 1, ""), edge(0, 2, ""),
755+
edge(1, 3, ""), edge(2, 3, ""))));
756756
assert_eq!(r.unwrap().as_slice(),
757757
r#"digraph hasse_diagram {
758758
N0[label="{x,y}"];
@@ -785,8 +785,8 @@ r#"digraph hasse_diagram {
785785

786786
let g = LabelledGraphWithEscStrs::new(
787787
"syntax_tree", labels,
788-
vec!(Edge(0, 1, "then"), Edge(0, 2, "else"),
789-
Edge(1, 3, ";"), Edge(2, 3, ";" )));
788+
vec!(edge(0, 1, "then"), edge(0, 2, "else"),
789+
edge(1, 3, ";"), edge(2, 3, ";" )));
790790

791791
render(&g, &mut writer).unwrap();
792792
let mut r = BufReader::new(writer.get_ref());

src/libtest/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn> ) -> io::IoR
842842
#[test]
843843
fn should_sort_failures_before_printing_them() {
844844
use std::io::MemWriter;
845-
use std::str;
846845

847846
let test_a = TestDesc {
848847
name: StaticTestName("a"),

src/libuuid/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ mod test {
520520
use super::{Uuid, VariantMicrosoft, VariantNCS, VariantRFC4122,
521521
Version1Mac, Version2Dce, Version3Md5, Version4Random,
522522
Version5Sha1};
523-
use std::str;
524523
use std::io::MemWriter;
525524
use std::rand;
526525

0 commit comments

Comments
 (0)