ic-query 0.2.19

Internet Computer query CLI for NNS, SNS, and related public network metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Module: sns::report::live::convert::common
//!
//! Responsibility: shared live conversion cleanup helpers.
//! Does not own: wire type definitions, report assembly, or rendering.
//! Boundary: normalizes optional text values before source/report models receive them.

/// Trim optional text and drop empty values.
pub(super) fn clean_optional_text(value: Option<String>) -> Option<String> {
    value
        .map(|value| value.trim().to_string())
        .filter(|value| !value.is_empty())
}