Function read_config_file

Source
fn read_config_file(config_path: &str) -> String
Expand description

Reads the configuration file at config_path and returns its contents.

Split from retrieve_config_file_path() so a caller that needs the path itself - to name the file in an error - resolves it once and passes it in, rather than resolving it a second time behind the caller’s back.

§Panics

Panics if the file does not exist, or cannot be read.