adding tidy rule to warn against use of &String and refactoring instances of &String in codebase

This commit is contained in:
jmr0 2015-11-25 21:49:12 -05:00
parent 8efc954531
commit df49cf2b13
4 changed files with 11 additions and 7 deletions

View file

@ -225,7 +225,7 @@ impl ReportsTree {
// Searches the tree's children for a path_seg match, and returns the index if there is a
// match.
fn find_child(&self, path_seg: &String) -> Option<usize> {
fn find_child(&self, path_seg: &str) -> Option<usize> {
for (i, child) in self.children.iter().enumerate() {
if child.path_seg == *path_seg {
return Some(i);