diff options
Diffstat (limited to 'src/pagespec.rs')
-rw-r--r-- | src/pagespec.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/pagespec.rs b/src/pagespec.rs index 1ebb1b1..55c83fb 100644 --- a/src/pagespec.rs +++ b/src/pagespec.rs @@ -93,11 +93,7 @@ pub enum OpCode { fn glob_matches(glob: &str, path: &str) -> bool { let glob: Vec<char> = glob.chars().collect(); let path: Vec<char> = path.chars().collect(); - if glob_matches_helper(&glob, &path) { - true - } else { - false - } + glob_matches_helper(&glob, &path) } fn glob_matches_helper(mut glob: &[char], mut path: &[char]) -> bool { @@ -141,11 +137,7 @@ fn glob_matches_helper(mut glob: &[char], mut path: &[char]) -> bool { fn page_matches(site: &Site, container: &Path, glob: &str, path: &str) -> bool { if glob_matches(glob, path) { let full_path = container.join(path); - if site.is_page(&full_path) { - true - } else { - false - } + site.is_page(&full_path) } else { false } |