aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/valid.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/valid.rs b/tests/valid.rs
index 42cc9f4..5693492 100644
--- a/tests/valid.rs
+++ b/tests/valid.rs
@@ -43,7 +43,7 @@ fn run(toml: &str, json: &str) {
let table = p.parse();
assert!(p.errors.len() == 0, "had_errors: {:?}",
p.errors.iter().map(|e| {
- (e.desc.clone(), toml.slice(e.lo - 5, e.hi + 5))
+ (e.desc.clone(), &toml[e.lo - 5..e.hi + 5])
}).collect::<Vec<(String, &str)>>());
assert!(table.is_some());
let toml = Table(table.unwrap());