fn circular_reference(from: usize, to: usize, ns: &Namespace) -> bool {
    if ns.contracts[from].creates.contains(&to) {
        return true;
    }

    ns.contracts[from]
        .creates
        .iter()
        .any(|n| circular_reference(*n, to, &ns))
}
/// check if from creates to, recursively
check if from creates to, recursively
check if from creates to recursively
fn circular_reference(from: usize, to: usize, ns: &Namespace) -> bool {
    if ns.contracts[from].creates.contains(&to) {
        return true;
    }
    ns.contracts[from]
        .creates
        .iter()
        .any(|n| circular_reference(*n, to, &ns))
}
fn circular_reference ( from : usize , to : usize , ns : & Namespace ) -> bool { if ns . contracts [ from ] . creates . contains ( & to ) { return true ; } ns . contracts [ from ] . creates . iter ( ) . any ( | n | circular_reference ( * n , to , & ns ) ) }
check if from creates to, recursively
check if from creates to recursively
from
usize
to
usize
ns
&Namespace
from
usize
to
usize
ns
&Namespace