hyalo-core 0.13.0

Core library for hyalo — frontmatter parsing, querying, and mutation for Markdown files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Lightweight warning helper for `hyalo-core`.
//!
//! Core-level code should call [`warn`] instead of `eprintln!` so that
//! the message is formatted consistently. The CLI layer (`hyalo-cli`)
//! provides its own richer warning system with quiet-mode suppression and
//! dedup tracking; this module is intentionally minimal — it just writes to
//! stderr with a standard `warning:` prefix.

/// Emit a warning message to stderr.
///
/// Formats the message with a `warning: ` prefix, matching the convention used
/// by the CLI layer.
pub fn warn(msg: impl AsRef<str>) {
    eprintln!("warning: {}", msg.as_ref());
}