UBTOH654TM6FU5ZZERAQZPW2PMJ7QVDHPMV6O236GB4Y6G2QGMFAC
fn load_channel<T>(cli: Option<&str>, txn: &T) -> anyhow::Result<(ChannelRef<T>, bool)>
where
T: TxnT,
{
let (channel_name, is_current_channel) = get_channel(cli, &*txn);
let channel = load_channel_exact(&channel_name, txn)?;
Ok((channel, is_current_channel))
}
fn load_channel_exact<T>(name: &str, txn: &T) -> anyhow::Result<ChannelRef<T>>
where
T: TxnT,
{
txn.load_channel(name)?
.ok_or_else(|| anyhow!("No such channel: {}", name))
}