cargo-allow 0.1.3

Source-tree exception ledger and policy scanner for Rust repositories.
1
2
3
4
5
6
7
8
9
10
11
use std::path::{Path, PathBuf};

pub(super) fn compat_policy_path(
    config: Option<&Path>,
    root: &Path,
    default_policy_file: &str,
) -> PathBuf {
    config
        .map(PathBuf::from)
        .unwrap_or_else(|| root.join(default_policy_file))
}