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

Force unused load_network and load_cosmetic to true when serializing #69

Merged
merged 1 commit into from Feb 5, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Force unused load_network and load_cosmetic to true when serializing

Although these two fields are unused on new versions of this repo, they
are still serialized with dummy values to maintain backwards
compatibility.

In particular, the second field is checked by older versions of the repo
to determine if network blocking should be short-circuited. Thus, it's
important that this field stores a value of `true`.
  • Loading branch information
antonok-edm committed Feb 5, 2020
commit 6b0cccf7a12a53dfb2496a78d09fed962a6355c9
@@ -91,7 +91,7 @@ pub struct Blocker {
debug: bool,
enable_optimizations: bool,
_unused: bool, // This field exists for backwards compatibility only.
_unused2: bool, // This field exists for backwards compatibility only.
_unused2: bool, // This field exists for backwards compatibility only, and *must* be true.

#[serde(default)]
resources: RedirectResourceStorage,
@@ -303,8 +303,8 @@ impl Blocker {
// Options
debug: options.debug,
enable_optimizations: options.enable_optimizations,
_unused: false,
_unused2: false,
_unused: true,
_unused2: true,

resources: RedirectResourceStorage::default(),
#[cfg(feature = "object-pooling")]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.