mirror of
https://github.com/rust-lang/log.git
synced 2025-10-02 23:34:32 +00:00
fix up some warnings
This commit is contained in:
parent
6d9e98aa03
commit
44b8e99059
@ -87,8 +87,6 @@ pub fn enabled(level: Level, target: &str) -> bool {
|
|||||||
|
|
||||||
#[cfg(feature = "kv_unstable")]
|
#[cfg(feature = "kv_unstable")]
|
||||||
mod kv_support {
|
mod kv_support {
|
||||||
use super::*;
|
|
||||||
|
|
||||||
use crate::kv;
|
use crate::kv;
|
||||||
|
|
||||||
pub type Value<'a> = kv::Value<'a>;
|
pub type Value<'a> = kv::Value<'a>;
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
//! // info!(a = 1; "Something of interest");
|
//! // info!(a = 1; "Something of interest");
|
||||||
//!
|
//!
|
||||||
//! let a: Value = record.key_values().get(Key::from("a")).unwrap();
|
//! let a: Value = record.key_values().get(Key::from("a")).unwrap();
|
||||||
|
//! assert_eq!(1, a.to_i64().unwrap());
|
||||||
//! # Ok(())
|
//! # Ok(())
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
|
@ -21,7 +21,7 @@ use std::fmt;
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # fn main() -> Result<(), log::kv::Error> {
|
/// # fn main() -> Result<(), log::kv::Error> {
|
||||||
/// use log::kv::{self, Source, Key, Value, source::VisitSource};
|
/// use log::kv::{self, Source, Key, Value, VisitSource};
|
||||||
///
|
///
|
||||||
/// // A `VisitSource` that prints all key-values
|
/// // A `VisitSource` that prints all key-values
|
||||||
/// // VisitSources are fed the key-value pairs of each key-values
|
/// // VisitSources are fed the key-value pairs of each key-values
|
||||||
|
@ -602,11 +602,6 @@ pub(in crate::kv) mod inner {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub use value_bag::test::TestToken as Token;
|
pub use value_bag::test::TestToken as Token;
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn to_test_token<'v>(inner: &Inner<'v>) -> Token {
|
|
||||||
inner.to_test_token()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn visit<'v>(
|
pub fn visit<'v>(
|
||||||
inner: &Inner<'v>,
|
inner: &Inner<'v>,
|
||||||
visitor: impl VisitValue<'v>,
|
visitor: impl VisitValue<'v>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user