fix every clippy warning possible, remove io_uring as default feature
this project's codebase is so horrendous, im shocked that no one has ran clippy at all. it had ~200 total lint warnings, some with performance issues and unsoundness, and the rest just very ugly codebase. i have sat down and fixed as many of these as possible and i am exhausted. i haven't fixed some extremely complex ones, but i brought it down from ~200 to ~30. i have also removed io_uring as a default feature due to it falling under the same category as linux eBPF: major kernel attack surface for minimal performance gains. this also makes it impossible to cross-compile from macOS to Linux because io_uring does not exist in Darwin land. there are far better ways to achieve better performance than io_uring on the codebase level. Signed-off-by: strawberry <june@girlboss.ceo>
This commit is contained in:
parent
19d1b484e0
commit
54a3f47851
33 changed files with 312 additions and 314 deletions
|
@ -27,10 +27,12 @@ use crate::Result;
|
|||
/// If a domain matches both the exclude and include list, the proxy will only be used if it was
|
||||
/// included because of a more specific rule than it was excluded. In the above example, the proxy
|
||||
/// would be used for `ordinary.onion`, `matrix.myspecial.onion`, but not `hello.myspecial.onion`.
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[derive(Clone, Default, Debug, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ProxyConfig {
|
||||
#[default]
|
||||
None,
|
||||
|
||||
Global {
|
||||
#[serde(deserialize_with = "crate::utils::deserialize_from_str")]
|
||||
url: Url,
|
||||
|
@ -48,11 +50,6 @@ impl ProxyConfig {
|
|||
})
|
||||
}
|
||||
}
|
||||
impl Default for ProxyConfig {
|
||||
fn default() -> Self {
|
||||
ProxyConfig::None
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct PartialProxyConfig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue