From 6fc041ae7fc47897d39f2e33a46b37c0091d76fd Mon Sep 17 00:00:00 2001 From: Thang Pham Date: Fri, 24 May 2024 22:54:10 -0400 Subject: [PATCH] update deps and bump app's version to 0.18.2 --- Cargo.lock | 280 +++++++++++++++----------- spotify_player/Cargo.toml | 18 +- spotify_player/src/client/handlers.rs | 2 +- spotify_player/src/event/clipboard.rs | 1 + spotify_player/src/main.rs | 3 +- spotify_player/src/media_control.rs | 4 +- spotify_player/src/state/player.rs | 4 +- 7 files changed, 177 insertions(+), 135 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58dd3ad2..60f48d52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", "bitflags 2.5.0", @@ -140,9 +140,9 @@ dependencies = [ "jni-sys", "libc", "log", - "ndk 0.8.0", + "ndk 0.9.0", "ndk-context", - "ndk-sys 0.5.0+25.2.9519653", + "ndk-sys 0.6.0+11769913", "num_enum 0.7.2", "thiserror", ] @@ -227,9 +227,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "array-init" @@ -395,22 +395,12 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - [[package]] name = "block2" -version = "0.3.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "block-sys", "objc2", ] @@ -523,9 +513,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -880,7 +870,7 @@ dependencies = [ "crossterm_winapi", "libc", "mio", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "signal-hook", "signal-hook-mio", "winapi", @@ -1070,6 +1060,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "either" version = "1.11.0" @@ -1927,17 +1923,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icrate" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" -dependencies = [ - "block2", - "dispatch", - "objc2", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2002,12 +1987,6 @@ dependencies = [ "hashbrown 0.14.3", ] -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - [[package]] name = "instant" version = "0.1.12" @@ -2458,7 +2437,7 @@ dependencies = [ "librespot-metadata", "log", "ogg", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "portaudio-rs", "rand", "rand_distr", @@ -2742,14 +2721,14 @@ dependencies = [ [[package]] name = "ndk" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ "bitflags 2.5.0", "jni-sys", "log", - "ndk-sys 0.5.0+25.2.9519653", + "ndk-sys 0.6.0+11769913", "num_enum 0.7.2", "raw-window-handle", "thiserror", @@ -2800,9 +2779,9 @@ dependencies = [ [[package]] name = "ndk-sys" -version = "0.5.0+25.2.9519653" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ "jni-sys", ] @@ -2991,25 +2970,103 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", "objc2-encode", ] +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.5.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + [[package]] name = "objc2-encode" -version = "3.0.0" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.5.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.5.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] [[package]] name = "objc_id" @@ -3163,9 +3220,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core 0.9.10", @@ -3557,21 +3614,21 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.26.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcb12f8fbf6c62614b0d56eb352af54f6a22410c3b079eb53ee93c7b97dd31d8" +checksum = "f44c9e68fd46eda15c646fbb85e1040b657a58cdc8c98db1d97a55930d991eef" dependencies = [ "bitflags 2.5.0", "cassowary", "compact_str", "crossterm", - "indoc", "itertools", "lru", "paste", "stability", "strum", "unicode-segmentation", + "unicode-truncate", "unicode-width", ] @@ -3610,15 +3667,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -3971,9 +4019,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +checksum = "7de61fa7334ee8ee1f5c3c58dcc414fb9361e7e8f5bff9d45f4d69eeb89a7169" dependencies = [ "ab_glyph", "log", @@ -4036,18 +4084,18 @@ checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.199" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -4056,9 +4104,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -4067,9 +4115,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -4308,7 +4356,7 @@ dependencies = [ [[package]] name = "spotify_player" -version = "0.18.1" +version = "0.18.2" dependencies = [ "anyhow", "async-trait", @@ -4331,7 +4379,7 @@ dependencies = [ "maybe-async", "notify-rust", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rand", "ratatui", "regex", @@ -4348,18 +4396,18 @@ dependencies = [ "ttl_cache", "viuer", "which", - "windows 0.54.0", + "windows 0.56.0", "winit", ] [[package]] name = "stability" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd1b177894da2a2d9120208c3386066af06a488255caabc5de8ddca22dbc3ce" +checksum = "2ff9eaf853dec4c8802325d8b6d3dffa86cc707fd7a1a4cdbf416e13b061787a" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -4388,7 +4436,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "phf_shared 0.10.0", "precomputed-hash", "serde", @@ -4678,7 +4726,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project-lite", "socket2 0.5.6", "tokio-macros", @@ -4756,21 +4804,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit 0.22.13", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -4799,9 +4847,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap 2.2.6", "serde", @@ -4954,6 +5002,16 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-truncate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5fbabedabe362c618c714dbefda9927b5afc8e2a8102f47f081089a9019226" +dependencies = [ + "itertools", + "unicode-width", +] + [[package]] name = "unicode-width" version = "0.1.11" @@ -5268,9 +5326,9 @@ dependencies = [ [[package]] name = "web-time" -version = "0.2.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -5343,16 +5401,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" -dependencies = [ - "windows-core 0.54.0", - "windows-targets 0.52.5", -] - [[package]] name = "windows" version = "0.56.0" @@ -5372,16 +5420,6 @@ dependencies = [ "windows-targets 0.52.5", ] -[[package]] -name = "windows-core" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" -dependencies = [ - "windows-result", - "windows-targets 0.52.5", -] - [[package]] name = "windows-core" version = "0.56.0" @@ -5641,9 +5679,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winit" -version = "0.29.15" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +checksum = "ea9e6d5d66cbf702e0dd820302144f51b69a95acdc495dd98ca280ff206562b1" dependencies = [ "ahash", "android-activity", @@ -5652,26 +5690,28 @@ dependencies = [ "bytemuck", "calloop", "cfg_aliases", + "concurrent-queue", "core-foundation", "core-graphics 0.23.2", "cursor-icon", - "icrate", + "dpi", "js-sys", "libc", - "log", "memmap2", - "ndk 0.8.0", - "ndk-sys 0.5.0+25.2.9519653", + "ndk 0.9.0", "objc2", - "once_cell", + "objc2-app-kit", + "objc2-foundation", "orbclient", "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", "sctk-adwaita", "smithay-client-toolkit", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", @@ -5681,7 +5721,7 @@ dependencies = [ "wayland-protocols-plasma", "web-sys", "web-time", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", "x11rb", "xkbcommon-dl", diff --git a/spotify_player/Cargo.toml b/spotify_player/Cargo.toml index 2a613f2f..491ffbac 100644 --- a/spotify_player/Cargo.toml +++ b/spotify_player/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spotify_player" -version = "0.18.1" +version = "0.18.2" authors = ["Thang Pham "] edition = "2021" license = "MIT" @@ -10,7 +10,7 @@ keywords = ["spotify", "tui", "player"] readme = "../README.md" [dependencies] -anyhow = "1.0.81" +anyhow = "1.0.86" clap = { version = "4.5.4", features = ["derive", "string"] } config_parser2 = "0.1.5" crossterm = "0.27.0" @@ -23,14 +23,14 @@ chrono = "0.4.37" reqwest = { version = "0.12.2", features = ["json"] } rpassword = "7.3.1" rspotify = "0.13.0" -serde = { version = "1.0.197", features = ["derive"] } +serde = { version = "1.0.202", features = ["derive"] } tokio = { version = "1.37.0", features = ["rt", "rt-multi-thread", "macros", "time"] } -toml = "0.8.12" -tui = { package = "ratatui", version = "=0.26.1" } +toml = "0.8.13" +tui = { package = "ratatui", version = "0.26.3" } rand = "0.8.5" maybe-async = "0.2.10" async-trait = "0.1.79" -parking_lot = "0.12.1" +parking_lot = "0.12.3" tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } lyric_finder = { version = "0.1.6", path = "../lyric_finder" , optional = true } @@ -40,7 +40,7 @@ viuer = { version = "0.7.1", optional = true } image = { version = "0.24.9", optional = true } notify-rust = { version = "4.10.0", optional = true, default-features = false, features = ["d"] } flume = "0.11.0" -serde_json = "1.0.115" +serde_json = "1.0.117" once_cell = "1.19.0" regex = "1.10.4" daemonize = { version = "0.5.0", optional = true } @@ -49,14 +49,14 @@ clap_complete = "4.5.1" which = "6.0.1" [target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies.winit] -version = "0.29.15" +version = "0.30.0" optional = true [target.'cfg(target_os = "windows")'.dependencies] clipboard-win = "5.3.0" [target.'cfg(target_os = "windows")'.dependencies.windows] -version = "0.54.0" +version = "0.56.0" features = [ "Win32_Foundation", "Win32_Graphics_Gdi", diff --git a/spotify_player/src/client/handlers.rs b/spotify_player/src/client/handlers.rs index cb2c6f6f..a659ec70 100644 --- a/spotify_player/src/client/handlers.rs +++ b/spotify_player/src/client/handlers.rs @@ -151,7 +151,7 @@ fn handle_page_change_event( if let Some(current_track) = state.player.read().current_playing_track() { if current_track.name != *track { tracing::info!("Current playing track \"{}\" is different from the track \"{track}\" shown up in the lyric page. Updating the track and fetching its lyric...", current_track.name); - *track = current_track.name.clone(); + track.clone_from(¤t_track.name); *artists = map_join(¤t_track.artists, |a| &a.name, ", "); *scroll_offset = 0; diff --git a/spotify_player/src/event/clipboard.rs b/spotify_player/src/event/clipboard.rs index 5bd48b58..5f467141 100644 --- a/spotify_player/src/event/clipboard.rs +++ b/spotify_player/src/event/clipboard.rs @@ -16,6 +16,7 @@ struct CommandProvider { paste_command: Command, } +#[cfg(not(target_os = "windows"))] struct NopProvider {} #[cfg(target_os = "windows")] diff --git a/spotify_player/src/main.rs b/spotify_player/src/main.rs index 9c09e7fb..b68916bd 100644 --- a/spotify_player/src/main.rs +++ b/spotify_player/src/main.rs @@ -217,6 +217,7 @@ async fn start_app(state: &state::SharedState) -> Result<()> { // control events. The below code will create an invisible window on startup // to listen to such events. let event_loop = winit::event_loop::EventLoop::new()?; + #[allow(deprecated)] event_loop.run(move |_, _| {})?; } } @@ -259,7 +260,7 @@ fn main() -> Result<()> { let mut configs = config::Configs::new(&config_folder, &cache_folder)?; if let Some(theme) = args.get_one::("theme") { // override the theme config if user specifies a `theme` cli argument - configs.app_config.theme = theme.to_owned(); + theme.clone_into(&mut configs.app_config.theme); } config::set_config(configs); } diff --git a/spotify_player/src/media_control.rs b/spotify_player/src/media_control.rs index 9f953fef..94783d04 100644 --- a/spotify_player/src/media_control.rs +++ b/spotify_player/src/media_control.rs @@ -232,8 +232,8 @@ mod windows { let mut has_message = PeekMessageW(&mut msg, None, 0, 0, PM_REMOVE).as_bool(); while msg.message != WM_QUIT && has_message { if !IsDialogMessageW(GetAncestor(msg.hwnd, GA_ROOT), &msg).as_bool() { - TranslateMessage(&msg); - DispatchMessageW(&msg); + let _ = TranslateMessage(&msg); + let _ = DispatchMessageW(&msg); } has_message = PeekMessageW(&mut msg, None, 0, 0, PM_REMOVE).as_bool(); diff --git a/spotify_player/src/state/player.rs b/spotify_player/src/state/player.rs index 6f3e875a..34356a0a 100644 --- a/spotify_player/src/state/player.rs +++ b/spotify_player/src/state/player.rs @@ -35,8 +35,8 @@ impl PlayerState { // update the playback's metadata based on the `buffered_playback` metadata if let Some(ref p) = self.buffered_playback { - playback.device.name = p.device_name.clone(); - playback.device.id = p.device_id.clone(); + playback.device.name.clone_from(&p.device_name); + playback.device.id.clone_from(&p.device_id); playback.is_playing = p.is_playing; playback.device.volume_percent = p.volume; playback.repeat_state = p.repeat_state;