Skip to content

Commit

Permalink
Fix clippy missing_docs warnings in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Oct 7, 2024
1 parent 35ee1ba commit 6c930d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions spdlog/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ pub enum Error {
Multiple(Vec<Error>),

#[cfg(test)]
#[doc(hidden)]
#[error("{0}")]
__ForInternalTestsUseOnly(i32),
}
Expand Down
6 changes: 3 additions & 3 deletions spdlog/src/formatter/pattern_formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ tuple_pattern! {
}

#[cfg(test)]
pub mod tests {
mod tests {
use std::ops::Range;

use super::*;
Expand All @@ -1209,14 +1209,14 @@ pub mod tests {
// them pub in test builds.

#[must_use]
pub fn get_mock_record() -> Record<'static> {
fn get_mock_record() -> Record<'static> {
Record::builder(Level::Info, "record_payload")
.logger_name("logger_name")
.source_location(Some(SourceLocation::__new("module", "file", 10, 20)))
.build()
}

pub fn test_pattern<P, T>(pattern: P, formatted: T, style_range: Option<Range<usize>>)
fn test_pattern<P, T>(pattern: P, formatted: T, style_range: Option<Range<usize>>)
where
P: Pattern,
T: AsRef<str>,
Expand Down

0 comments on commit 6c930d7

Please sign in to comment.