From 97a62ab884ea4d609e374d2f7f81ba141e55e3c4 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 16 Nov 2023 17:21:24 +0100 Subject: [PATCH] Remove the unused `log::sink` module The `LogSink` trait got introduced in 7188fc9 to abstract log sinks (destinations). A `FileSink` implementation was added in 3ff4fee to write logs to a file and optional support for the orchestrator was added in d35bf6e. It isn't needed anymore since the implementation in da12a96 stopped relying on `FileSink` or rather `FileLogSinkFactory`. The `log::filesink` module was then removed in `bfe392e` but `log::sink` never got cleanup up. I noticed this now because `rustc 1.75.0-beta.1` detected the unused import: `sink::*` in `src/log/mod.rs:18:9` via the `unused_imports` lint. Signed-off-by: Michael Weiss --- src/log/mod.rs | 3 --- src/log/sink.rs | 21 --------------------- 2 files changed, 24 deletions(-) delete mode 100644 src/log/sink.rs diff --git a/src/log/mod.rs b/src/log/mod.rs index 7075d9ab..56be0828 100644 --- a/src/log/mod.rs +++ b/src/log/mod.rs @@ -14,7 +14,4 @@ pub use parser::*; mod item; pub use item::*; -mod sink; -pub use sink::*; - mod util; diff --git a/src/log/sink.rs b/src/log/sink.rs deleted file mode 100644 index 31396375..00000000 --- a/src/log/sink.rs +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2020-2022 science+computing ag and other contributors -// -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ -// -// SPDX-License-Identifier: EPL-2.0 -// - -use anyhow::Result; - -use crate::log::LogItem; - -pub trait LogSink: Sized { - fn log_item(&mut self, item: &LogItem) -> Result<()>; - - fn close(self) -> Result<()> { - Ok(()) - } -}