Skip to content
Myr

Merge pull request #1536 from bin-ly/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Use 'MAIN_SEPARATOR_STR' instead of '&MAIN_SEPARATOR.to_string()'

authored by Thayne McCombs · committed by GitHub · parents 8c7a84e, 7794c4a · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • tests:+1 added−1 removed
  • other:+2 added−2 removed

2 files+3 added−3 removed

modified:src/exec/input.rs+2 added-2 removed
32 unmodified lines
3334#[cfg(test)]35mod path_tests {36 use super::*;37 use std::path::MAIN_SEPARATOR;37 use std::path::MAIN_SEPARATOR_STR;3839 fn correct(input: &str) -> String {40 input.replace('/', &MAIN_SEPARATOR.to_string())40 input.replace('/', MAIN_SEPARATOR_STR)41 }4243 macro_rules! func_tests {44 ($($name:ident: $func:ident for $input:expr => $output:expr)+) => {
43 unmodified lines
modified:tests/testenv/mod.rs+1 added-1 removed
127 unmodified lines
128 .replace('\0', "NULL\n")129 .lines()130 .map(|line| {131 let line = if trim_start { line.trim_start() } else { line };132 let line = line.replace('/', &std::path::MAIN_SEPARATOR.to_string());132 let line = line.replace('/', std::path::MAIN_SEPARATOR_STR);133 if normalize_line {134 let mut words: Vec<_> = line.split_whitespace().collect();135 words.sort_unstable();136 return words.join(" ");
215 unmodified lines