Skip to main content

resolve_token

Function resolve_token 

Source
pub fn resolve_token(
    explicit_token: Option<&str>,
    config: Option<&ChipzenConfig>,
) -> Option<String>
Expand description

Return the token to use, honoring precedence:

  1. An explicit token (even an empty string — the dev was explicit).
  2. Else, the config-file token.
  3. Else, None (the caller decides whether that’s a hard error).