diff options
author | Vika <vika@fireburn.ru> | 2025-04-09 20:23:55 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2025-04-09 20:23:55 +0300 |
commit | 21bc90512beda86b09e7adbae2fa84e78c84dadb (patch) | |
tree | 4e581dbd338c4fafc5b57199f7a004e18e34f644 /src/util.rs | |
parent | 2e63356d2f9154d374f2f9084c57b48fe5558395 (diff) | |
download | bowl-21bc90512beda86b09e7adbae2fa84e78c84dadb.tar.zst |
cargo fmt
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.rs b/src/util.rs index c3d5bd7..83d8e2b 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,7 +1,8 @@ use std::borrow::Cow; pub fn append_query(uri: &glib::Uri, q: impl IntoIterator<Item = (String, String)>) -> glib::Uri { - let mut oq: Vec<(Cow<'static, str>, Cow<'static, str>)> = uri.query() + let mut oq: Vec<(Cow<'static, str>, Cow<'static, str>)> = uri + .query() .map(|q| serde_urlencoded::from_str(&q).unwrap()) .unwrap_or_default(); oq.extend(q.into_iter().map(|(k, v)| (k.into(), v.into()))); @@ -13,7 +14,10 @@ pub fn append_query(uri: &glib::Uri, q: impl IntoIterator<Item = (String, String mod tests { #[test] fn test_append_query() -> Result<(), glib::Error> { - let uri = glib::Uri::parse("https://fireburn.ru/.kittybox/micropub?test=a", glib::UriFlags::NONE)?; + let uri = glib::Uri::parse( + "https://fireburn.ru/.kittybox/micropub?test=a", + glib::UriFlags::NONE, + )?; let q = [ ("q".to_owned(), "config".to_owned()), ("awoo".to_owned(), "nya".to_owned()), |