mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
adding tidy rule to warn against use of &String and refactoring instances of &String in codebase
This commit is contained in:
parent
8efc954531
commit
df49cf2b13
4 changed files with 11 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue