# shellcheck shell=bash
# Enable bash completion for cargo (Rust package manager)
if command -v rustc &>/dev/null; then
    _cargo_comp="$(rustc --print sysroot)/etc/bash_completion.d/cargo"
    if [[ -f "$_cargo_comp" ]]; then
        # shellcheck source=/dev/null
        . "$_cargo_comp"
    fi
    unset _cargo_comp
fi
