mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 00:34:40 +01:00
Bump dependencies & use tokio only for zbus crates
This commit is contained in:
parent
e271feb4e0
commit
9385f8174a
4 changed files with 24 additions and 140 deletions
130
Cargo.lock
generated
130
Cargo.lock
generated
|
@ -86,7 +86,6 @@ version = "0.4.0-alpha.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3a03db93e3739203252bfe98ad0b31d4039a978c46c5673f5bf0e0c4ac2b42be"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"enumflags2",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
|
@ -99,6 +98,7 @@ dependencies = [
|
|||
"rand",
|
||||
"serde",
|
||||
"serde_repr",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"url",
|
||||
"zbus",
|
||||
|
@ -115,17 +115,6 @@ dependencies = [
|
|||
"parking_lot",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener",
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-executor"
|
||||
version = "1.5.0"
|
||||
|
@ -140,21 +129,6 @@ dependencies = [
|
|||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-global-executor"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"blocking",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "1.12.0"
|
||||
|
@ -196,32 +170,6 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-std"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-global-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"crossbeam-utils",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-lite",
|
||||
"gloo-timers",
|
||||
"kv-log-macro",
|
||||
"log",
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"slab",
|
||||
"wasm-bindgen-futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-task"
|
||||
version = "4.3.0"
|
||||
|
@ -239,12 +187,6 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atomic-waker"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"
|
||||
|
||||
[[package]]
|
||||
name = "atomic_refcell"
|
||||
version = "0.1.9"
|
||||
|
@ -258,7 +200,7 @@ dependencies = [
|
|||
"aes-gcm",
|
||||
"anyhow",
|
||||
"ashpd",
|
||||
"base64 0.20.0",
|
||||
"base64 0.21.0",
|
||||
"binascii",
|
||||
"diesel",
|
||||
"diesel_migrations",
|
||||
|
@ -304,12 +246,6 @@ version = "0.13.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.21.0"
|
||||
|
@ -389,20 +325,6 @@ dependencies = [
|
|||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "blocking"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-lock",
|
||||
"async-task",
|
||||
"atomic-waker",
|
||||
"fastrand",
|
||||
"futures-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.12.0"
|
||||
|
@ -664,16 +586,6 @@ dependencies = [
|
|||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctor"
|
||||
version = "0.1.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctr"
|
||||
version = "0.9.2"
|
||||
|
@ -908,7 +820,7 @@ dependencies = [
|
|||
name = "favicon-scrapper"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.0",
|
||||
"image 0.24.5",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
|
@ -1302,18 +1214,6 @@ version = "0.3.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "gloo-timers"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gobject-sys"
|
||||
version = "0.17.0"
|
||||
|
@ -1932,15 +1832,6 @@ dependencies = [
|
|||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kv-log-macro"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
|
@ -2079,7 +1970,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"value-bag",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2796,9 +2686,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.22.0"
|
||||
version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b"
|
||||
checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
@ -3653,16 +3543,6 @@ version = "0.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||
|
||||
[[package]]
|
||||
name = "value-bag"
|
||||
version = "1.0.0-alpha.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
|
||||
dependencies = [
|
||||
"ctor",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
|
|
|
@ -6,7 +6,7 @@ version = "4.2.0"
|
|||
[dependencies]
|
||||
adw = {package = "libadwaita", version = "0.3", features = ["v1_2"]}
|
||||
anyhow = "1.0"
|
||||
ashpd = {version = "0.4.0-alpha.4", features = ["pipewire", "gtk4", "tracing"]}
|
||||
ashpd = {version = "0.4.0-alpha.4", default-features = false, features = ["pipewire", "gtk4", "tokio", "tracing"]}
|
||||
binascii = "0.1"
|
||||
diesel = {version = "2.0", features = ["sqlite", "r2d2"]}
|
||||
diesel_migrations = {version = "2.0", features = ["sqlite"]}
|
||||
|
@ -33,7 +33,7 @@ url = "2.2"
|
|||
zbar-rust = "0.0"
|
||||
scrypt = { version = "0.10", default-features = false }
|
||||
aes-gcm = "0.10"
|
||||
base64 = "0.20"
|
||||
base64 = "0.21"
|
||||
uuid = { version = "1.0", features = ["v4"] }
|
||||
favicon-scrapper = {path = "./favicon-scrapper"}
|
||||
image = {version = "0.24", default-features = false, features = ["png"]}
|
||||
|
|
|
@ -9,11 +9,11 @@ autotests = false
|
|||
[dependencies]
|
||||
reqwest = "0.11"
|
||||
percent-encoding = "2.1"
|
||||
quick-xml = "0.22"
|
||||
quick-xml = "0.27"
|
||||
image = {version = "0.24", features = ["ico", "png"], default-features = false}
|
||||
url = "2.2"
|
||||
once_cell = "1.9"
|
||||
tracing = "0.1"
|
||||
base64 = "0.13.0"
|
||||
base64 = "0.21"
|
||||
svg_metadata = "0.4"
|
||||
tokio = { version = "1.0", features = ["rt-multi-thread", "fs", "io-util", "macros"] }
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
use std::{fmt, path::PathBuf};
|
||||
|
||||
use percent_encoding::percent_decode_str;
|
||||
use quick_xml::events::{attributes::Attribute, BytesStart, Event};
|
||||
use quick_xml::{
|
||||
events::{attributes::Attribute, BytesStart, Event},
|
||||
name::QName,
|
||||
};
|
||||
use tracing::debug;
|
||||
use url::Url;
|
||||
|
||||
|
@ -98,17 +101,16 @@ impl Scrapper {
|
|||
}
|
||||
|
||||
fn from_reader(reader: &mut quick_xml::Reader<&[u8]>, base_url: Option<&Url>) -> Vec<Favicon> {
|
||||
let mut buf = Vec::new();
|
||||
let mut urls = Vec::new();
|
||||
loop {
|
||||
match reader.read_event(&mut buf) {
|
||||
match reader.read_event() {
|
||||
Ok(Event::Start(ref e)) | Ok(Event::Empty(ref e)) => match e.name() {
|
||||
b"link" => {
|
||||
QName(b"link") => {
|
||||
if let Some(url) = Self::from_link(e, base_url) {
|
||||
urls.push(url);
|
||||
}
|
||||
}
|
||||
b"meta" => {
|
||||
QName(b"meta") => {
|
||||
if let Some(url) = Self::from_meta(e, base_url) {
|
||||
urls.push(url);
|
||||
}
|
||||
|
@ -120,7 +122,6 @@ impl Scrapper {
|
|||
_ => (),
|
||||
}
|
||||
}
|
||||
buf.clear();
|
||||
urls
|
||||
}
|
||||
|
||||
|
@ -131,7 +132,7 @@ impl Scrapper {
|
|||
for attr in e.html_attributes() {
|
||||
match attr {
|
||||
Ok(Attribute {
|
||||
key: b"content",
|
||||
key: QName(b"content"),
|
||||
value,
|
||||
}) => {
|
||||
let mut href = String::from_utf8(value.into_owned()).ok()?;
|
||||
|
@ -147,7 +148,7 @@ impl Scrapper {
|
|||
};
|
||||
}
|
||||
Ok(Attribute {
|
||||
key: b"name",
|
||||
key: QName(b"name"),
|
||||
value,
|
||||
}) => {
|
||||
if SUPPORTED_META.contains(&value.into_owned().as_slice()) {
|
||||
|
@ -176,7 +177,7 @@ impl Scrapper {
|
|||
for attr in e.html_attributes() {
|
||||
match attr {
|
||||
Ok(Attribute {
|
||||
key: b"href",
|
||||
key: QName(b"href"),
|
||||
value,
|
||||
}) => {
|
||||
let mut href = String::from_utf8(value.into_owned()).ok()?;
|
||||
|
@ -228,7 +229,7 @@ impl Scrapper {
|
|||
}
|
||||
}
|
||||
Ok(Attribute {
|
||||
key: b"sizes",
|
||||
key: QName(b"sizes"),
|
||||
value,
|
||||
}) => {
|
||||
let size_inner = String::from_utf8(value.into_owned()).ok()?.to_lowercase();
|
||||
|
@ -239,7 +240,10 @@ impl Scrapper {
|
|||
metadata.size = Some((w, h));
|
||||
}
|
||||
}
|
||||
Ok(Attribute { key: b"rel", value }) => {
|
||||
Ok(Attribute {
|
||||
key: QName(b"rel"),
|
||||
value,
|
||||
}) => {
|
||||
if SUPPORTED_RELS.contains(&value.into_owned().as_slice()) {
|
||||
has_proper_rel = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue