Skip to content

Commit

Permalink
deps: migrate battery to starship-battery
Browse files Browse the repository at this point in the history
The former is unmaintained and is flagging in cargo audit for its
indirect deps.

The starship folks have forked it; let's use that.

refs: svartalf/rust-battery#92
refs: #1952
  • Loading branch information
wez committed May 5, 2022
1 parent cee50ff commit ef96646
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 32 deletions.
48 changes: 18 additions & 30 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env_logger = "0.9"

[dependencies]
anyhow = "1.0"
battery = "0.7"
starship-battery = "0.7"
bitflags = "1.3"
bstr = "0.2"
chrono = {version="0.4", features=["unstable-locales"]}
Expand Down
2 changes: 1 addition & 1 deletion config/src/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ fn opt_string(s: Option<&str>) -> String {
}

fn battery_info<'lua>(_: &'lua Lua, _: ()) -> mlua::Result<Vec<BatteryInfo>> {
use battery::{Manager, State};
use starship_battery::{Manager, State};
let manager = Manager::new().map_err(|e| mlua::Error::external(e))?;
let mut result = vec![];
for b in manager.batteries().map_err(|e| mlua::Error::external(e))? {
Expand Down

0 comments on commit ef96646

Please sign in to comment.