aboutsummaryrefslogtreecommitdiff
path: root/tools/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/lib.rs')
-rw-r--r--tools/src/lib.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/src/lib.rs b/tools/src/lib.rs
index 7a0de3e3c..21a9468bc 100644
--- a/tools/src/lib.rs
+++ b/tools/src/lib.rs
@@ -3,24 +3,12 @@ extern crate itertools;
3use std::hash; 3use std::hash;
4use itertools::Itertools; 4use itertools::Itertools;
5 5
6#[derive(Debug, Eq)] 6#[derive(Debug)]
7pub struct Test { 7pub struct Test {
8 pub name: String, 8 pub name: String,
9 pub text: String, 9 pub text: String,
10} 10}
11 11
12impl PartialEq for Test {
13 fn eq(&self, other: &Test) -> bool {
14 self.name.eq(&other.name)
15 }
16}
17
18impl hash::Hash for Test {
19 fn hash<H: hash::Hasher>(&self, state: &mut H) {
20 self.name.hash(state)
21 }
22}
23
24pub fn collect_tests(s: &str) -> Vec<(usize, Test)> { 12pub fn collect_tests(s: &str) -> Vec<(usize, Test)> {
25 let mut res = vec![]; 13 let mut res = vec![];
26 let prefix = "// "; 14 let prefix = "// ";