pub fn locate_canister_ids(
    canister_ids: Vec<String>,
    wallet_ids: Vec<String>,
    ic: &dyn Ic,
) -> Vec<CanisterLocator> {
    fn into_canister_id(canister_id: &str) -> CanisterId {
        CanisterId::new(
            PrincipalId::from_str(canister_id)
                .unwrap_or_else(|_| panic!("Could not create PrincipalId from {}", canister_id)),
        )
        .unwrap_or_else(|_| panic!("Could not convert {} into canister id.", canister_id))
    }
    fn into_canister_ids<'a>(canister_ids: &'_ [String]) -> Vec<CanisterHandle<'a>> {
        canister_ids
            .iter()
            .map(|id| into_canister_id(id).into())
            .collect()
    }

    locate_canisters_internal(
        into_canister_ids(&canister_ids),
        into_canister_ids(&wallet_ids),
        ic,
    )
}
/// Locates the canister ids on the network relative to the given wallet ids and
/// returns a vector of canister locators.
Locates the canister ids on the network relative to the given wallet ids and
returns a vector of canister locators.
Locates the canister ids on the network relative to the given wallet ids and returns a vector of canister locators .
pub fn locate_canister_ids(
    canister_ids: Vec<String>,
    wallet_ids: Vec<String>,
    ic: &dyn Ic,
) -> Vec<CanisterLocator> {
    fn into_canister_id(canister_id: &str) -> CanisterId {
        CanisterId::new(
            PrincipalId::from_str(canister_id)
                .unwrap_or_else(|_| panic!("Could not create PrincipalId from {}", canister_id)),
        )
        .unwrap_or_else(|_| panic!("Could not convert {} into canister id.", canister_id))
    }
    fn into_canister_ids<'a>(canister_ids: &'_ [String]) -> Vec<CanisterHandle<'a>> {
        canister_ids
            .iter()
            .map(|id| into_canister_id(id).into())
            .collect()
    }
    locate_canisters_internal(
        into_canister_ids(&canister_ids),
        into_canister_ids(&wallet_ids),
        ic,
    )
}
pub fn locate_canister_ids ( canister_ids : Vec < String > , wallet_ids : Vec < String > , ic : & dyn Ic , ) -> Vec < CanisterLocator > { fn into_canister_id ( canister_id : & str ) -> CanisterId { CanisterId :: new ( PrincipalId :: from_str ( canister_id ) . unwrap_or_else ( | _ | panic ! ( " " canister_id ) ) , ) . unwrap_or_else ( | _ | panic ! ( " " canister_id ) ) } fn into_canister_ids < ' a > ( canister_ids : & ' _ [ String ] ) -> Vec < CanisterHandle < ' a > > { canister_ids . iter ( ) . map ( | id | into_canister_id ( id ) . into ( ) ) . collect ( ) } locate_canisters_internal ( into_canister_ids ( & canister_ids ) , into_canister_ids ( & wallet_ids ) , ic , ) }
Locates the canister ids on the network relative to the given wallet ids and
returns a vector of canister locators.
Locates the canister ids on the network relative to the given wallet ids and returns a vector of canister locators .
canister_ids
Vec<String>
wallet_ids
Vec<String>
ic
&dyn Ic
canister_ids
Vec<String>
wallet_ids
Vec<String>
ic
&dyn Ic