Shortened a function a bit, would love to continue but I've got so much
homework
This commit is contained in:
@@ -33,7 +33,7 @@ pub fn get_page(bytes: &[u8], page: &str) -> Vec<u8>
|
||||
|
||||
if let Some(opening_index) = find_pattern(bytes, &search_pages_bytes)
|
||||
&& let Some(closing_index) = find_closing_brace(bytes, opening_index+search_pages_bytes.len())
|
||||
{
|
||||
{ // TODO ignore when in quotes or name
|
||||
//println!("found pages: {} to {}", opening_index, closing_index);
|
||||
if let Some(opening_page_index) = find_pattern(&bytes[opening_index..=closing_index], &search_bytes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user