sccmod 0.6.4

A mediocre module manager for handling multiple versions of self-compiled modules
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Read a colon-separated environment variable and return a vector of strings
///
/// If only one string is present, it is returned as a single-element vector.
///
/// # Errors
/// If the variable is not set or is invalid, [`Err`] is returned with an error
/// message.
pub fn read_var(name: &str) -> Option<Vec<String>> {
    Some(
        std::env::var(name)
            .ok()?
            .split(':')
            .map(std::string::ToString::to_string)
            .collect(),
    )
}