Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements uBO style polyfills for requests redirects #29

Merged
merged 9 commits into from Jun 18, 2019

fixes benchmarks to work with renamed util functions

  • Loading branch information
AndriusA committed Jun 10, 2019
commit b20dfe3fa2d54312738e6a340b58e160ab8adbce
@@ -21,7 +21,7 @@ struct TestRequest {
}

fn load_requests() -> Vec<TestRequest> {
let requests_str = adblock::utils::read_rules("data/requests.json");
let requests_str = adblock::utils::read_file_lines("data/requests.json");
let reqs: Vec<TestRequest> = requests_str.into_iter().map(|r| serde_json::from_str(&r)).filter_map(Result::ok).collect();
reqs
}
@@ -3,7 +3,7 @@ extern crate criterion;
use criterion::*;

use adblock;
use adblock::utils::{read_rules, rules_from_lists};
use adblock::utils::{read_file_lines, rules_from_lists};
use adblock::blocker::{Blocker, BlockerOptions};


@@ -15,7 +15,7 @@ fn default_lists() -> Vec<String> {

fn default_rules_lists() -> Vec<Vec<String>> {
vec![
read_rules("data/easylist.to/easylist/easylist.txt"),
read_file_lines("data/easylist.to/easylist/easylist.txt"),
]
}

@@ -18,7 +18,7 @@ struct TestRequest {
}

fn load_requests() -> Vec<TestRequest> {
let requests_str = adblock::utils::read_rules("data/requests.json");
let requests_str = adblock::utils::read_file_lines("data/requests.json");
let reqs: Vec<TestRequest> = requests_str
.into_iter()
.map(|r| serde_json::from_str(&r))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.