You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: offsets.rs
    path of file: ./repos/fluvio/crates/fluvio-test/src/tests/smoke
    
    the code of the file until where you have to start completion: use std::collections::HashMap;

use fluvio::FluvioAdmin;

use fluvio_controlplane_metadata::partition::PartitionSpec;
use fluvio_controlpla
    
async fn last_leo(admin: &mut FluvioAdmin, topic: &str) -> i64 {
    let partitions = admin
        .all::<PartitionSpec>()
        .await
        .expect("get partitions status");

    for partition in partitions {
        let replica: ReplicaKey = partition
            .name
            .clone()
            .try_into()
            .expect("cannot parse partition");

        if replica.topic == topic && replica.partition == 0 {
            return partition.status.leader.leo;
        }
    }

    panic!("cannot found partition 0 for topic: {topic}");
}