From 1dffbe5c379894add3097c005a8b0e4c70173e4a Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Fri, 21 Dec 2018 22:44:31 +0000 Subject: Remove TODO on self_hosting_parsing This improving this code is not a good use of people-time, and this might be the most performant approach nonwithstanding an api for this use case being added to walkdir --- crates/ra_syntax/tests/test.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crates/ra_syntax/tests/test.rs') diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 14ad836b5..4266864bd 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs @@ -65,14 +65,10 @@ fn self_hosting_parsing() { for entry in walkdir::WalkDir::new(dir) .into_iter() .filter_entry(|entry| { - !entry - .path() - .components() - // TODO: this more neatly - .any(|component| { - // Get all files which are not in the crates/ra_syntax/tests/data folder - component == Component::Normal(OsStr::new("data")) - }) + !entry.path().components().any(|component| { + // Get all files which are not in the crates/ra_syntax/tests/data folder + component == Component::Normal(OsStr::new("data")) + }) }) .map(|e| e.unwrap()) .filter(|entry| { -- cgit v1.2.3