Skip to content

Commit

Permalink
build: notify-rust now a mandatory dep
Browse files Browse the repository at this point in the history
The reason to keep this an optional dep was a portability issue that was
fixed in Feb:

NixOS/nixpkgs#160876
  • Loading branch information
zeenix committed Jul 13, 2022
1 parent f569550 commit e37f26b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄
"""

[features]
default = ["battery", "notify"]
default = ["battery"]
battery = ["starship-battery"]
config-schema = ["schemars"]
notify = ["notify-rust"]

[dependencies]
ansi_term = "0.12.1"
Expand All @@ -47,9 +46,7 @@ git2 = { version = "0.14.4", default-features = false }
indexmap = { version = "1.9.1", features = ["serde"] }
local_ipaddress = "0.1.3"
log = { version = "0.4.16", features = ["std"] }
# nofity-rust is optional (on by default) because the crate doesn't currently build for darwin with nix
# see: https://github.com/NixOS/nixpkgs/issues/160876
notify-rust = { version = "4.5.8", optional = true }
notify-rust = { version = "4.5.8" }
once_cell = "1.13.0"
open = "3.0.1"
os_info = "3.4.0"
Expand Down
10 changes: 0 additions & 10 deletions src/modules/cmd_duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
Some(undistract_me(module, &config, elapsed))
}

#[cfg(not(feature = "notify"))]
fn undistract_me<'a, 'b>(
module: Module<'a>,
_config: &'b CmdDurationConfig,
_elapsed: u128,
) -> Module<'a> {
module
}

#[cfg(feature = "notify")]
fn undistract_me<'a, 'b>(
module: Module<'a>,
config: &'b CmdDurationConfig,
Expand Down

0 comments on commit e37f26b

Please sign in to comment.