Skip to content
  • Federico Mena Quintero's avatar
    Turn most g_warnings into panics, and don't use g_warning() when built as a standalone Rust crate · 4df0ef3d
    Federico Mena Quintero authored
    Most of the calls to rsvg_g_warning() indicate programming errors,
    mostly around functions being called at the wrong time (e.g. the
    is_loaded() checks).  Those are panics now.
    For the other genuine warnings, we cannot call rsvg_g_warning_from_c()
    when building librsvg_crate, since that does not link to the C part of  However, for the cases where that is used, those cases
    do return meaningful Rust error codes, so they don't need warnings.
    So, the rsvg_internals crate now has a feature "c-library" - when
    enabled, it will call rsvg_g_warning_from_c(); when disabled, it will
    do nothing.