mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 05:34:57 +02: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
49
Cargo.lock
generated
49
Cargo.lock
generated
@ -182,23 +182,6 @@ dependencies = [
|
|||||||
"rustc-demangle",
|
"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]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.3.2"
|
version = "1.3.2"
|
||||||
@ -226,7 +209,6 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"battery",
|
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"clap",
|
"clap",
|
||||||
@ -252,6 +234,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"smol",
|
"smol",
|
||||||
|
"starship-battery",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"time",
|
"time",
|
||||||
@ -1040,6 +1023,19 @@ dependencies = [
|
|||||||
"libc",
|
"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]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.24.1"
|
version = "0.24.1"
|
||||||
@ -1451,6 +1447,23 @@ dependencies = [
|
|||||||
"winapi",
|
"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]]
|
[[package]]
|
||||||
name = "static_assertions"
|
name = "static_assertions"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
|
@ -32,6 +32,7 @@ strip = "symbols"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["fern", "log", "battery", "gpu"]
|
default = ["fern", "log", "battery", "gpu"]
|
||||||
|
battery = ["starship-battery"]
|
||||||
deploy = ["battery", "gpu"]
|
deploy = ["battery", "gpu"]
|
||||||
gpu = ["nvidia"]
|
gpu = ["nvidia"]
|
||||||
nvidia = ["nvml-wrapper"]
|
nvidia = ["nvml-wrapper"]
|
||||||
@ -64,7 +65,7 @@ unicode-width = "0.1.9"
|
|||||||
|
|
||||||
fern = { version = "0.6.1", optional = true }
|
fern = { version = "0.6.1", optional = true }
|
||||||
log = { version = "0.4.16", 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 }
|
nvml-wrapper = { version = "0.7.0", optional = true }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
|
@ -9,7 +9,7 @@ use fxhash::FxHashMap;
|
|||||||
use sysinfo::{System, SystemExt};
|
use sysinfo::{System, SystemExt};
|
||||||
|
|
||||||
#[cfg(feature = "battery")]
|
#[cfg(feature = "battery")]
|
||||||
use battery::{Battery, Manager};
|
use starship_battery::{Battery, Manager};
|
||||||
|
|
||||||
use crate::app::layout_manager::UsedWidgets;
|
use crate::app::layout_manager::UsedWidgets;
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
//! - FreeBSD
|
//! - FreeBSD
|
||||||
//! - DragonFlyBSD
|
//! - 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},
|
units::{power::watt, ratio::percent, time::second},
|
||||||
Battery, Manager,
|
Battery, Manager,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user