From 4401123ea1caac9a13967f18ed3ce0a9052dece1 Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Mon, 4 Jan 2021 19:22:05 +0100 Subject: [PATCH] chg: print warnings to stderr rather than stdout Warning messages emitted when encountering broken links/references will now be printed to stderr as opposed to stdout. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 08a6d6b..7fbd13d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -446,7 +446,7 @@ impl<'a> Exporter<'a> { let path = lookup_filename_in_vault(note_ref.file, &self.vault_contents.as_ref().unwrap()); if path.is_none() { // TODO: Extract into configurable function. - println!( + eprintln!( "Warning: Unable to find embedded note\n\tReference: '{}'\n\tSource: '{}'\n", note_ref.file, context.current_file().display(), @@ -506,7 +506,7 @@ impl<'a> Exporter<'a> { lookup_filename_in_vault(reference.file, &self.vault_contents.as_ref().unwrap()); if target_file.is_none() { // TODO: Extract into configurable function. - println!( + eprintln!( "Warning: Unable to find referenced note\n\tReference: '{}'\n\tSource: '{}'\n", reference.file, context.current_file().display(),