fn ion_text_string()

in src/results/mod.rs [29:48]


fn ion_text_string(result: Result<IonCReaderHandle, IonCError>) -> String {
    let value = match result {
        Ok(v) => v,
        Err(e) => {
            warn!(
                "unable to display document because it could not be parsed: {}",
                e
            );
            return String::new();
        }
    };

    match ion_compat::to_string_pretty(value) {
        Ok(d) => d,
        Err(e) => {
            warn!("ion formatter is not able to display this document: {}", e);
            return String::new();
        }
    }
}