mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-21 19:53:05 +00:00
deps: migrate to starship-battery (#724)
Migrates the `battery` dependency to the more actively maintained `starship-battery` fork, found at https://github.com/starship/rust-battery. See https://github.com/svartalf/rust-battery/pull/92 for more information.
This commit is contained in:
parent
9d6d712e27
commit
4ceaf8d008
4 changed files with 36 additions and 22 deletions
49
Cargo.lock
generated
49
Cargo.lock
generated
|
@ -182,23 +182,6 @@ dependencies = [
|
|||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "battery"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4b624268937c0e0a3edb7c27843f9e547c320d730c610d3b8e6e8e95b2026e4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"core-foundation 0.7.0",
|
||||
"lazycell",
|
||||
"libc",
|
||||
"mach",
|
||||
"nix 0.19.1",
|
||||
"num-traits",
|
||||
"uom",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
|
@ -226,7 +209,6 @@ dependencies = [
|
|||
"anyhow",
|
||||
"assert_cmd",
|
||||
"backtrace",
|
||||
"battery",
|
||||
"cargo-husky",
|
||||
"cfg-if",
|
||||
"clap",
|
||||
|
@ -252,6 +234,7 @@ dependencies = [
|
|||
"regex",
|
||||
"serde",
|
||||
"smol",
|
||||
"starship-battery",
|
||||
"sysinfo",
|
||||
"thiserror",
|
||||
"time",
|
||||
|
@ -1040,6 +1023,19 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.24.1"
|
||||
|
@ -1451,6 +1447,23 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "starship-battery"
|
||||
version = "0.7.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3336198ad004af4447ae69be4f4e562c26814570f8f0c1e37858405a294e015d"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"core-foundation 0.7.0",
|
||||
"lazycell",
|
||||
"libc",
|
||||
"mach",
|
||||
"nix 0.23.1",
|
||||
"num-traits",
|
||||
"uom",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
|
|
|
@ -32,6 +32,7 @@ strip = "symbols"
|
|||
|
||||
[features]
|
||||
default = ["fern", "log", "battery", "gpu"]
|
||||
battery = ["starship-battery"]
|
||||
deploy = ["battery", "gpu"]
|
||||
gpu = ["nvidia"]
|
||||
nvidia = ["nvml-wrapper"]
|
||||
|
@ -64,7 +65,7 @@ unicode-width = "0.1.9"
|
|||
|
||||
fern = { version = "0.6.1", optional = true }
|
||||
log = { version = "0.4.16", optional = true }
|
||||
battery = { version = "0.7.8", optional = true }
|
||||
starship-battery = { version = "0.7.9", optional = true }
|
||||
nvml-wrapper = { version = "0.7.0", optional = true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
|
|
|
@ -9,7 +9,7 @@ use fxhash::FxHashMap;
|
|||
use sysinfo::{System, SystemExt};
|
||||
|
||||
#[cfg(feature = "battery")]
|
||||
use battery::{Battery, Manager};
|
||||
use starship_battery::{Battery, Manager};
|
||||
|
||||
use crate::app::layout_manager::UsedWidgets;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
//! - FreeBSD
|
||||
//! - DragonFlyBSD
|
||||
//!
|
||||
//! For more information, see https://github.com/svartalf/rust-battery
|
||||
//! For more information, see https://github.com/starship/rust-battery
|
||||
|
||||
use battery::{
|
||||
use starship_battery::{
|
||||
units::{power::watt, ratio::percent, time::second},
|
||||
Battery, Manager,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue