From 918f1e4eeab94ee8850aefd7c17b48ea2adcd6d2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Jun 2020 16:04:17 +0200 Subject: fix up doc comments and tests --- src/filters/log.rs | 5 +++-- src/filters/mod.rs | 4 ++-- src/playerclass.rs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/filters/log.rs b/src/filters/log.rs index bde02e5..30cf0cb 100644 --- a/src/filters/log.rs +++ b/src/filters/log.rs @@ -122,12 +122,12 @@ pub fn log_time(lower: Option>, upper: Option>) -> B Box::new(TimeFilter(lower, upper)) } -/// Like [`after`][after], but ignores the file name for date calculations. +/// Only include logs after the given date, but ignore the file name for date calculations. pub fn log_after(when: DateTime) -> Box { log_time(Some(when), None) } -/// Like [`before`][before], but ignores the file name for date calculations. +/// Only include logs before the given date, but ignore the file name for date calculations. pub fn log_before(when: DateTime) -> Box { log_time(None, Some(when)) } @@ -148,6 +148,7 @@ pub fn challenge_mote() -> Box { #[cfg(test)] mod tests { + use chrono::TimeZone; use super::*; #[test] diff --git a/src/filters/mod.rs b/src/filters/mod.rs index e966851..7ab0d42 100644 --- a/src/filters/mod.rs +++ b/src/filters/mod.rs @@ -63,8 +63,8 @@ pub trait Filter: Send + Sync + fmt::Debug { /// Determine early (before processing all events) whether the log stands a chance to be /// included. /// - /// Note that you can return [Inclusion::Unkown] if this filter cannot determine yet a definite - /// answer. + /// Note that you can return [Inclusion::Unknown] if this filter cannot determine yet a + /// definite answer. fn filter_early(&self, _: &Early) -> Inclusion { Inclusion::Unknown } diff --git a/src/playerclass.rs b/src/playerclass.rs index 31a49aa..ba207e6 100644 --- a/src/playerclass.rs +++ b/src/playerclass.rs @@ -14,7 +14,7 @@ use thiserror::Error; /// probably don't want any Dragonhunters. /// /// So this enum unifies the handling between core specs and elite specs, and provides them with a -/// convenient [`Display`][Display] implementation as well. +/// convenient [`Display`][fmt::Display] implementation as well. #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] pub enum PlayerClass { Profession(Profession), -- cgit v1.2.3