perf: Lazy load files from directory (#335)

Changes context to use `once_cell` to lazily evaluate directory listing on first use.
This commit is contained in:
Nick Young
2019-09-15 00:23:53 +10:00
committed by Kevin Song
parent 8f03c14582
commit 7e891f17c1
12 changed files with 46 additions and 54 deletions
-1
View File
@@ -1,5 +1,4 @@
use ansi_term::Color;
use git2::Repository;
use std::io;
use std::process::Command;
-1
View File
@@ -1,5 +1,4 @@
use ansi_term::Color;
use git2::Repository;
use std::fs::{self, File};
use std::io;
use std::process::Command;
-4
View File
@@ -1,8 +1,4 @@
use ansi_term::Color;
use std::fs;
use std::io;
use std::path::Path;
use tempfile::TempDir;
use crate::common::{self, TestCommand};