Function tor_config::cmdline::tweak_toml_bareword

source ·
fn tweak_toml_bareword(s: &str) -> Option<String>
Expand description

If s is a string of the form “keyword=bareword”, return a new string where bareword is quoted. Otherwise return None.

This isn’t a smart transformation outside the context of ‘config’, since many serde formats don’t do so good a job when they get a string when they wanted a number or whatever. But ‘config’ is pretty happy to convert strings to other stuff.