about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-01 11:28:34 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-01 13:29:42 -0700
commite98dce3e00a7b6bfd264418ef993bbf9cdb1f0b6 (patch)
tree1569b4aa8d412df9c49904b8bddeb44d8d4ecef2 /src/compiletest
parentd528aa9960cb9b937d8ef6c09905a6a8076d5f3a (diff)
downloadrust-e98dce3e00a7b6bfd264418ef993bbf9cdb1f0b6.tar.gz
rust-e98dce3e00a7b6bfd264418ef993bbf9cdb1f0b6.zip
std: Changing the meaning of the count to splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/header.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 9612c0e06a3..f5505b6e83a 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -311,7 +311,7 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
     parse_name_value_directive(line, "exec-env").map(|nv| {
         // nv is either FOO or FOO=BAR
         let mut strs: Vec<String> = nv
-                                      .splitn(1, '=')
+                                      .splitn(2, '=')
                                       .map(|s| s.to_string())
                                       .collect();