From 176ec3a64df169b82ca11f84ab789d742d779483 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 26 Feb 2024 21:25:42 +0100 Subject: [PATCH] runtime: suppress eprint message with log feature gate Closes #99 --- src/runtime.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime.rs b/src/runtime.rs index 634c067..639ae61 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -187,6 +187,7 @@ where let stock = Stock::load(&stock_path).or_else(|err| { if matches!(err, DeserializeError::Decode(DecodeError::Io(ref err)) if err.kind() == ErrorKind::NotFound) { + #[cfg(feature = "log")] eprint!("stock file is absent, creating a new one ... "); let stock = Stock::default(); return Ok(stock)