MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / empty_string_or_none_clears

Function empty_string_or_none_clears

src/automation_cli.rs:797–803  ·  view source on GitHub ↗
(value: String)

Source from the content-addressed store, hash-verified

795}
796
797fn empty_string_or_none_clears(value: String) -> Option<String> {
798 if string_clears_optional(&value) {
799 None
800 } else {
801 Some(value)
802 }
803}
804
805fn string_clears_optional(value: &str) -> bool {
806 value.is_empty() || value.eq_ignore_ascii_case("none")

Callers

nothing calls this directly

Calls 1

string_clears_optionalFunction · 0.85

Tested by

no test coverage detected