From 3f38ff1e8661b474e2115e69b25bf9fd047fe4bc Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:55:14 +0200 Subject: [PATCH 1/3] remove time to update stuff --- Cargo.lock | 297 +++++++++++++++++------------------- hardware/src/lib.rs | 5 +- hardware/src/windows.rs | 2 - src/cli.rs | 4 +- src/fake_integrated_test.rs | 2 - ui/src/lib.rs | 79 ++++------ ui/src/message.rs | 2 - 7 files changed, 176 insertions(+), 215 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3c237f3..d04d4f9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,9 +89,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] @@ -318,12 +318,12 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener 5.3.1", + "event-listener-strategy", "futures-core", "pin-project-lite", ] @@ -346,7 +346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener-strategy 0.5.2", + "event-listener-strategy", "futures-core", "pin-project-lite", ] @@ -382,7 +382,7 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", ] @@ -409,17 +409,17 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.0", + "polling 3.7.1", "rustix 0.38.34", "slab", "tracing", @@ -437,12 +437,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -463,7 +463,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "async-io 2.3.2", + "async-io 2.3.3", "blocking", "futures-lite 2.3.0", ] @@ -487,18 +487,18 @@ dependencies = [ [[package]] name = "async-process" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" dependencies = [ "async-channel 2.3.1", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "async-signal", "async-task", "blocking", "cfg-if", - "event-listener 5.3.0", + "event-listener 5.3.1", "futures-lite 2.3.0", "rustix 0.38.34", "tracing", @@ -518,12 +518,12 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" dependencies = [ - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", @@ -623,9 +623,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -781,9 +781,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369cfaf2a5bed5d8f8202073b2e093c9f508251de1551a0deb4253e4c7d80909" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", @@ -843,7 +843,7 @@ checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ "bitflags 2.5.0", "log", - "polling 3.7.0", + "polling 3.7.1", "rustix 0.38.34", "slab", "thiserror", @@ -857,7 +857,7 @@ checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.5.0", "log", - "polling 3.7.0", + "polling 3.7.1", "rustix 0.38.34", "slab", "thiserror", @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ "jobserver", "libc", @@ -968,9 +968,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a483f3cbf7cec2e153d424d0e92329d816becc6421389bd494375c6065921b9b" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -979,9 +979,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" dependencies = [ "clap_builder", "clap_derive", @@ -989,9 +989,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" dependencies = [ "anstream", "anstyle", @@ -1001,9 +1001,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1013,9 +1013,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "clipboard-win" @@ -1249,7 +1249,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1268,7 +1268,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "quote", "syn 1.0.109", @@ -1277,13 +1277,13 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.11.2" -source = "git+https://github.com/pop-os/cosmic-text.git#2f5f2c63dabc0173adaa95d619a777454a3c39af" +source = "git+https://github.com/pop-os/cosmic-text.git#6eb67bb524482c8214ac209108a8fe621ce7e995" dependencies = [ "bitflags 2.5.0", "fontdb", - "libm", "log", "rangemap", + "rayon", "rustc-hash", "rustybuzz", "self_cell 1.0.4", @@ -1299,7 +1299,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "almost", "cosmic-config", @@ -1432,6 +1432,12 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "ctor-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f791803201ab277ace03903de1594460708d2d54df6053f2d9e82f592b19e3b" + [[package]] name = "cursor-icon" version = "1.1.0" @@ -1516,7 +1522,7 @@ dependencies = [ "serde_json", "serial_test", "thiserror", - "toml 0.8.13", + "toml 0.8.14", "utils", ] @@ -1723,9 +1729,9 @@ checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", @@ -1733,9 +1739,9 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", @@ -1789,9 +1795,9 @@ checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" [[package]] name = "etagere" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306960881d6c46bd0dd6b7f07442a441418c08d0d3e63d8d080b0f64c6343e4e" +checksum = "dff377452246a4a2e0ef3a7e85ce78ed77c7f93c3a4771e1c93d0cc0c69eb411" dependencies = [ "euclid", "svg_fmt", @@ -1825,43 +1831,22 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -2030,9 +2015,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-types" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf6aa1de86490d8e39e04589bd04eb5953cc2a5ef0c25e389e807f44fd24e41" +checksum = "34fd7136aca682873d859ef34494ab1a7d3f57ecd485ed40eb6437ee8c85aa29" dependencies = [ "bytemuck", ] @@ -2299,9 +2284,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gl_generator" @@ -2532,7 +2517,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.13", + "toml 0.8.14", "unic-langid", ] @@ -2618,7 +2603,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "dnd", "iced_accessibility", @@ -2636,7 +2621,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "accesskit", "accesskit_winit", @@ -2645,7 +2630,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "bitflags 2.5.0", "dnd", @@ -2665,7 +2650,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "futures", "iced_core", @@ -2679,7 +2664,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2703,7 +2688,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2715,7 +2700,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "dnd", "iced_core", @@ -2727,7 +2712,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "iced_core", "once_cell", @@ -2737,7 +2722,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "bytemuck", "cosmic-text", @@ -2754,7 +2739,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "bitflags 2.5.0", "bytemuck", @@ -2780,7 +2765,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "dnd", "iced_renderer", @@ -2796,7 +2781,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "dnd", "iced_graphics", @@ -3111,7 +3096,7 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=master#8b0bb6a677ef7dfc02f97e1f579308cf3c18eefd" +source = "git+https://github.com/pop-os/libcosmic?branch=master#9bb89fefca4dd4d3902dfa81cfb98e80b933fa68" dependencies = [ "apply", "ashpd", @@ -3135,6 +3120,7 @@ dependencies = [ "lazy_static", "palette", "rfd", + "serde", "slotmap", "taffy", "thiserror", @@ -3718,9 +3704,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -3977,9 +3963,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -4023,9 +4009,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", @@ -4109,9 +4095,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -4238,9 +4224,9 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.19.1" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4749db2bd1c853db31a7ae5ee2fc6c30bbddce353ea8fedf673fed187c68c7" +checksum = "e8b8af39d1f23869711ad4cea5e7835a20daa987f80232f7f2a2374d648ca64d" dependencies = [ "bytemuck", "font-types", @@ -4295,9 +4281,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -4307,9 +4293,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -4318,9 +4304,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "renderdoc-sys" @@ -5099,21 +5085,22 @@ dependencies = [ [[package]] name = "tiny-xlib" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" +checksum = "1d52f22673960ad13af14ff4025997312def1223bfa7c8e4949d099e6b3d5d1c" dependencies = [ "as-raw-xcb-connection", - "ctor", + "ctor-lite", "libloading 0.8.3", + "pkg-config", "tracing", ] [[package]] name = "tinystr" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", ] @@ -5135,9 +5122,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -5162,14 +5149,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.13", + "toml_edit 0.22.14", ] [[package]] @@ -5205,15 +5192,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.13", ] [[package]] @@ -5387,9 +5374,9 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -5478,9 +5465,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "utils" @@ -5602,9 +5589,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +checksum = "34e9e6b6d4a2bb4e7e69433e0b35c7923b95d4dc8503a84d25ec917a4bbfdf07" dependencies = [ "cc", "downcast-rs", @@ -5616,9 +5603,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.2" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +checksum = "1e63801c85358a431f986cffa74ba9599ff571fc5774ac113ed3b490c19a1133" dependencies = [ "bitflags 2.5.0", "rustix 0.38.34", @@ -5639,9 +5626,9 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.1" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" +checksum = "a206e8b2b53b1d3fcb9428fec72bc278ce539e2fa81fe2bfc1ab27703d5187b9" dependencies = [ "rustix 0.38.34", "wayland-client", @@ -5688,9 +5675,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +checksum = "67da50b9f80159dec0ea4c11c13e24ef9e7574bd6ce24b01860a175010cea565" dependencies = [ "proc-macro2", "quick-xml", @@ -5699,9 +5686,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "105b1842da6554f91526c14a2a2172897b7f745a805d62af4ce698706be79c12" dependencies = [ "dlib", "log", @@ -6216,9 +6203,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -6278,12 +6265,12 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "xdg-home" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -6312,9 +6299,9 @@ dependencies = [ [[package]] name = "xkeysym" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" dependencies = [ "bytemuck", ] @@ -6396,18 +6383,18 @@ version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989c3977a7aafa97b12b9a35d21cdcff9b0d2289762b14683f45d66b1ba6c48f" dependencies = [ - "async-broadcast 0.7.0", + "async-broadcast 0.7.1", "async-executor", "async-fs 2.1.2", - "async-io 2.3.2", - "async-lock 3.3.0", - "async-process 2.2.2", + "async-io 2.3.3", + "async-lock 3.4.0", + "async-process 2.2.3", "async-recursion", "async-task", "async-trait", "blocking", "enumflags2", - "event-listener 5.3.0", + "event-listener 5.3.1", "futures-core", "futures-sink", "futures-util", diff --git a/hardware/src/lib.rs b/hardware/src/lib.rs index 50aa5eb0..003c81e1 100644 --- a/hardware/src/lib.rs +++ b/hardware/src/lib.rs @@ -1,6 +1,6 @@ use derive_more::Display; use serde::Serialize; -use std::{fmt::Debug, rc::Rc, time::Duration}; +use std::{fmt::Debug, rc::Rc}; use thiserror::Error; #[macro_use] @@ -131,9 +131,6 @@ pub fn new() -> Result { } pub trait HardwareBridge { - /// Approximative time to update sensors on my pc - const TIME_TO_UPDATE: Duration = Duration::from_millis(0); - fn new() -> Result where Self: Sized; diff --git a/hardware/src/windows.rs b/hardware/src/windows.rs index 93b3850a..6b624460 100644 --- a/hardware/src/windows.rs +++ b/hardware/src/windows.rs @@ -295,8 +295,6 @@ impl WindowsBridge { } impl HardwareBridge for WindowsBridge { - const TIME_TO_UPDATE: Duration = Duration::from_millis(250); - fn new() -> crate::Result { let process_handle = spawn_windows_server()?; let stream = try_connect()?; diff --git a/src/cli.rs b/src/cli.rs index a66354cd..2dd1ea4e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -34,7 +34,6 @@ pub fn run_cli(mut app_state: AppState) { error!("{}", e); break; } - std::thread::sleep(H::TIME_TO_UPDATE); if let Err(e) = app_state.update.optimized( &mut app_state.app_graph.nodes, @@ -45,8 +44,7 @@ pub fn run_cli(mut app_state: AppState) { } let settings_update_delay = - Duration::from_millis(app_state.dir_manager.settings().update_delay) - - H::TIME_TO_UPDATE; + Duration::from_millis(app_state.dir_manager.settings().update_delay); let final_delay = std::cmp::max(settings_update_delay, Duration::from_millis(50)); match rx.recv_timeout(final_delay) { diff --git a/src/fake_integrated_test.rs b/src/fake_integrated_test.rs index 3bb29a71..c7f3c879 100644 --- a/src/fake_integrated_test.rs +++ b/src/fake_integrated_test.rs @@ -44,8 +44,6 @@ fn run(mut app_state: AppState) { break; } - std::thread::sleep(H::TIME_TO_UPDATE); - app_state .update .optimized( diff --git a/ui/src/lib.rs b/ui/src/lib.rs index 7d0552bd..3fa2e034 100644 --- a/ui/src/lib.rs +++ b/ui/src/lib.rs @@ -89,7 +89,7 @@ impl cosmic::Application for Ui { .current_config_text() .to_owned(); - let mut ui_state = Ui { + let ui_state = Ui { nodes_c: NodesC::new(flags.app_graph.nodes.values()), app_state: flags, core, @@ -100,13 +100,11 @@ impl cosmic::Application for Ui { graph_window: None, }; - let update_graph_command = ui_state.maybe_update_hardware_to_update_graph(); - let commands = Command::batch([ command::set_theme(to_cosmic_theme( &ui_state.app_state.dir_manager.settings().theme, )), - update_graph_command, + cosmic::app::command::message(cosmic::app::message::app(AppMsg::Tick)), ]); (ui_state, commands) @@ -116,29 +114,8 @@ impl cosmic::Application for Ui { let dir_manager = &mut self.app_state.dir_manager; match message { - AppMsg::Tick => return self.maybe_update_hardware_to_update_graph(), - AppMsg::UpdateGraph => { - if let Err(e) = self.app_state.update.all( - &mut self.app_state.app_graph.nodes, - &mut self.app_state.bridge, - ) { - error!("{}", e); - self.is_updating = false; - } else if let Err(e) = self.app_state.bridge.update() { - error!("{}", e); - self.is_updating = false; - } else { - return wait_hardware_update_to_finish::(AppMsg::UpdateRootNodes); - } - } - AppMsg::UpdateRootNodes => { - if let Err(e) = self.app_state.update.nodes_which_update_can_change( - &mut self.app_state.app_graph.nodes, - &mut self.app_state.bridge, - ) { - error!("{}", e); - } - self.is_updating = false; + AppMsg::Tick => { + self.update_hardware(); } AppMsg::ModifNode(id, modif_node_msg) => { @@ -403,7 +380,7 @@ impl cosmic::Application for Ui { AppGraph::from_config(config, self.app_state.bridge.hardware()); self.nodes_c = NodesC::new(self.app_state.app_graph.nodes.values()); - return self.maybe_update_hardware_to_update_graph(); + self.update_hardware(); } None => { self.current_config_cached.clear(); @@ -606,29 +583,37 @@ fn to_cosmic_theme(theme: &AppTheme) -> theme::Theme { } } -fn wait_hardware_update_to_finish(msg_to_send: AppMsg) -> Command { - Command::perform( - async { - tokio::time::sleep(H::TIME_TO_UPDATE).await; - }, - |_| cosmic::app::Message::App(msg_to_send), - ) -} - impl Ui { - fn maybe_update_hardware_to_update_graph(&mut self) -> Command { + fn update_hardware(&mut self) { if !self.is_updating { - self.is_updating = true; - if let Err(e) = self.app_state.bridge.update() { - error!("{}", e); - self.is_updating = false; - } else { - return wait_hardware_update_to_finish::(AppMsg::UpdateGraph); - } - } else { warn!("An update is already processing: skipping that one."); + return; } - Command::none() + self.is_updating = true; + + if let Err(e) = self.app_state.bridge.update() { + error!("{}", e); + self.is_updating = false; + return; + } + if let Err(e) = self.app_state.update.all( + &mut self.app_state.app_graph.nodes, + &mut self.app_state.bridge, + ) { + error!("{}", e); + self.is_updating = false; + return; + } + + if let Err(e) = self.app_state.update.nodes_which_update_can_change( + &mut self.app_state.app_graph.nodes, + &mut self.app_state.bridge, + ) { + error!("{}", e); + self.is_updating = false; + return; + } + self.is_updating = false; } } diff --git a/ui/src/message.rs b/ui/src/message.rs index c68e8404..00798699 100644 --- a/ui/src/message.rs +++ b/ui/src/message.rs @@ -10,8 +10,6 @@ use crate::graph::GraphWindowMsg; #[derive(Debug, Clone)] pub enum AppMsg { Tick, - UpdateGraph, - UpdateRootNodes, Config(ConfigMsg), Settings(SettingsMsg), From e117e934bc278326b0efbc0d4c82b89e8f10c6fd Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:56:53 +0200 Subject: [PATCH 2/3] Update lib.rs --- ui/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/lib.rs b/ui/src/lib.rs index 3fa2e034..886bcbdf 100644 --- a/ui/src/lib.rs +++ b/ui/src/lib.rs @@ -585,7 +585,7 @@ fn to_cosmic_theme(theme: &AppTheme) -> theme::Theme { impl Ui { fn update_hardware(&mut self) { - if !self.is_updating { + if self.is_updating { warn!("An update is already processing: skipping that one."); return; } From a048fe6d936dd7f191bf2e39c9f33b171ff9322e Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Sun, 9 Jun 2024 16:11:23 +0200 Subject: [PATCH 3/3] remove smol dep --- Cargo.lock | 48 ++++-------------------------------------------- ui/Cargo.toml | 4 ++-- 2 files changed, 6 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d04d4f9b..e59441d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,7 +50,7 @@ source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#5f9b61c82 dependencies = [ "accesskit", "accesskit_consumer", - "async-channel 2.3.1", + "async-channel", "async-executor", "async-task", "atspi", @@ -294,7 +294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" dependencies = [ "async-fs 2.1.2", - "async-net 2.0.0", + "async-net", "enumflags2", "futures-channel", "futures-util", @@ -328,17 +328,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - [[package]] name = "async-channel" version = "2.3.1" @@ -446,17 +435,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-net" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" -dependencies = [ - "async-io 1.13.0", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "async-net" version = "2.0.0" @@ -491,7 +469,7 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" dependencies = [ - "async-channel 2.3.1", + "async-channel", "async-io 2.3.3", "async-lock 3.4.0", "async-signal", @@ -751,7 +729,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.3.1", + "async-channel", "async-task", "futures-io", "futures-lite 2.3.0", @@ -2655,7 +2633,6 @@ dependencies = [ "futures", "iced_core", "log", - "smol", "tokio", "wasm-bindgen-futures", "wasm-timer", @@ -4806,23 +4783,6 @@ dependencies = [ "wayland-backend", ] -[[package]] -name = "smol" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" -dependencies = [ - "async-channel 1.9.0", - "async-executor", - "async-fs 1.6.0", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-net 1.8.0", - "async-process 1.8.1", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "smol_str" version = "0.2.2" diff --git a/ui/Cargo.toml b/ui/Cargo.toml index 6a5fe990..9c22bd72 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -29,12 +29,12 @@ git = "https://github.com/pop-os/libcosmic" branch = "master" default-features = false features = [ - "smol", - # disable because cause seg fault when quitting the app on flatpak + # cause seg fault when quitting the app on flatpak "wgpu", "winit", "tokio", "multi-window" + # "smol", #"a11y", #"debug", #"serde-keycode",