commit 3bbed50af769e2310c0bb366ab12a1d22c115082
parent 86ba5b7a5f65b6579813b86a4414270f896e6424
Author: dm <dm@work-pc>
Date: Thu, 17 Feb 2022 10:31:19 +0800
fix: lint
Diffstat:
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
@@ -11,12 +11,12 @@
deprecated
)]
-use adblock::blocker::{BlockerError as RustBlockerError, Redirection};
use adblock::blocker::BlockerResult as RustBlockerResult;
+use adblock::blocker::{BlockerError as RustBlockerError, Redirection};
use adblock::cosmetic_filter_cache::UrlSpecificResources as RustUrlSpecificResources;
use adblock::engine::Engine as RustEngine;
-use adblock::lists::{FilterFormat, ParseOptions};
use adblock::lists::FilterSet as RustFilterSet;
+use adblock::lists::{FilterFormat, ParseOptions};
use pyo3::class::PyObjectProtocol;
use pyo3::create_exception;
use pyo3::exceptions::PyException;
@@ -24,16 +24,15 @@ use pyo3::prelude::*;
use pyo3::types::PyBytes;
use pyo3::PyErr;
+use adblock::resources::{
+ AddResourceError as RustAddResourceError, MimeType, Resource, ResourceType,
+};
use std::collections::HashMap;
use std::collections::HashSet;
use std::error::Error;
use std::fmt::{self, Display};
use std::fs;
use std::io::{Read, Write};
-use adblock::resources::{
- AddResourceError as RustAddResourceError, MimeType, Resource, ResourceType,
-};
-
/// Brave's adblocking library in Python!
#[pymodule]
@@ -197,7 +196,6 @@ create_exception!(adblock, BadFilterAddUnsupported, BlockerException);
create_exception!(adblock, FilterExists, BlockerException);
create_exception!(adblock, AddResourceError, BlockerException);
-
impl From<BlockerError> for PyErr {
fn from(err: BlockerError) -> Self {
let msg = format!("{:?}", err);