diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-04 10:07:13 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-04 10:07:17 +0100 |
commit | 89e48c21245e1b09678363fcf157094c1234b277 (patch) | |
tree | 92bcf2a40a57c78e0291649386bce0d933b4dc23 /src | |
parent | ff8eb615b26bc6f01034f1e75108416759d8bd2b (diff) |
Maintenance: Remove Display impl
Because `std::string::ToString` is automatically implemented for
all `std::fmt::Display` implementing types, we do not need this bit of
code.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/endpoint/scheduler.rs | 2 | ||||
-rw-r--r-- | src/log/item.rs | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/endpoint/scheduler.rs b/src/endpoint/scheduler.rs index 6a780b4..57b8043 100644 --- a/src/endpoint/scheduler.rs +++ b/src/endpoint/scheduler.rs @@ -273,7 +273,7 @@ impl<'a> LogReceiver<'a> { Ok({ accu.iter() .map(crate::log::LogItem::display) - .map_ok(crate::log::Display::to_string) + .map_ok(|d| d.to_string()) .collect::<Result<Vec<String>>>()? .join("\n") }) diff --git a/src/log/item.rs b/src/log/item.rs index 6a8a29a..58fb466 100644 --- a/src/log/item.rs +++ b/src/log/item.rs @@ -30,12 +30,6 @@ impl LogItem { pub struct Display(String); -impl Display { - pub fn to_string(self) -> String { - self.0 - } -} - impl std::fmt::Display for Display { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { write!(f, "{}", self.0) |