summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorÁrni Dagur <arni@dagur.eu>2020-12-16 16:14:14 +0000
committerÁrni Dagur <arni@dagur.eu>2020-12-16 16:42:14 +0000
commitd044df8d15132bd1631ded04f8e7989457a593fc (patch)
tree575075af4b024216d4b78ff883b61c9c46dbc5e6 /src/lib.rs
parentc53294dd3e4bb0c0c30cb55ca444fd1e4ce26df1 (diff)
Update upstream library, include Cargo.lock
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs
index fc837b8..eb84531 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -45,11 +45,6 @@ fn adblock(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
45pub struct BlockerResult { 45pub struct BlockerResult {
46 #[pyo3(get)] 46 #[pyo3(get)]
47 pub matched: bool, 47 pub matched: bool,
48 /// Normally, Brave Browser returns `200 OK` with an empty body when
49 /// `matched` is `True`, except if `explicit_cancel` is also `True`, in
50 /// which case the request is cancelled.
51 #[pyo3(get)]
52 pub explicit_cancel: bool,
53 /// Important is used to signal that a rule with the `important` option 48 /// Important is used to signal that a rule with the `important` option
54 /// matched. An `important` match means that exceptions should not apply 49 /// matched. An `important` match means that exceptions should not apply
55 /// and no further checking is neccesary--the request should be blocked 50 /// and no further checking is neccesary--the request should be blocked
@@ -91,7 +86,6 @@ impl Into<BlockerResult> for RustBlockerResult {
91 fn into(self) -> BlockerResult { 86 fn into(self) -> BlockerResult {
92 BlockerResult { 87 BlockerResult {
93 matched: self.matched, 88 matched: self.matched,
94 explicit_cancel: self.explicit_cancel,
95 important: self.important, 89 important: self.important,
96 redirect: self.redirect, 90 redirect: self.redirect,
97 exception: self.exception, 91 exception: self.exception,
@@ -105,9 +99,8 @@ impl Into<BlockerResult> for RustBlockerResult {
105impl PyObjectProtocol for BlockerResult { 99impl PyObjectProtocol for BlockerResult {
106 fn __repr__(&self) -> PyResult<String> { 100 fn __repr__(&self) -> PyResult<String> {
107 Ok(format!( 101 Ok(format!(
108 "BlockerResult({}, {}, {}, {:?}, {:?}, {:?}, {:?})", 102 "BlockerResult({}, {}, {:?}, {:?}, {:?}, {:?})",
109 self.matched, 103 self.matched,
110 self.explicit_cancel,
111 self.important, 104 self.important,
112 self.redirect, 105 self.redirect,
113 self.exception, 106 self.exception,