Skip to content

Commit

Permalink
deps: migrate to starship-battery
Browse files Browse the repository at this point in the history
Migrates the `battery` dependency to the more actively maintained
`starship-battery` fork, found at https://github.com/starship/rust-battery.
See svartalf/rust-battery#92 for more information.
  • Loading branch information
ClementTsang committed May 6, 2022
1 parent 9d6d712 commit 60347e1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
49 changes: 31 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ strip = "symbols"

[features]
default = ["fern", "log", "battery", "gpu"]
battery = ["starship-battery"]
deploy = ["battery", "gpu"]
gpu = ["nvidia"]
nvidia = ["nvml-wrapper"]
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/app/data_harvester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/app/data_harvester/batteries/battery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 60347e1

Please sign in to comment.