MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / unwrap_or_die

Method unwrap_or_die

kuma-cli/src/utils.rs:71–79  ·  view source on GitHub ↗
(self, cli: &Cli)

Source from the content-addressed store, hash-verified

69 E: ToString,
70{
71 fn unwrap_or_die(self, cli: &Cli) -> T {
72 match self {
73 Ok(t) => t,
74 Err(error) => {
75 print_value(&json!({"error": error.to_string()}), cli);
76 std::process::exit(1)
77 }
78 }
79 }
80}
81
82pub(crate) fn print_value<T>(value: &T, cli: &Cli)

Callers 4

connectFunction · 0.45
print_resultMethod · 0.45
load_fileFunction · 0.45
fromMethod · 0.45

Calls 1

print_valueFunction · 0.85

Tested by

no test coverage detected