Skip to content

Commit

Permalink
refactor: use new kv feature
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Dec 11, 2024
1 parent 71d1621 commit f9313f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ anyhow = { version = "1.0" }
colored = { version = "2.1" }
env_filter = { version = "0.1" }
jiff = { version = "0.1.14" }
log = { version = "0.4", features = ["std", "kv_unstable"] }
log = { version = "0.4", features = ["std", "kv"] }

# Optional dependencies
crossbeam-channel = { version = "0.5", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/layout/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct KvCollector<'a> {
kvs: &'a mut Map<String, Value>,
}

impl<'kvs> log::kv::Visitor<'kvs> for KvCollector<'_> {
impl<'kvs> log::kv::VisitSource<'kvs> for KvCollector<'_> {
fn visit_pair(
&mut self,
key: log::kv::Key<'kvs>,
Expand Down
4 changes: 2 additions & 2 deletions src/layout/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct KvWriter<'a, 'kvs> {
writer: &'kvs mut std::fmt::Formatter<'a>,
}

impl<'kvs> log::kv::Visitor<'kvs> for KvWriter<'_, 'kvs> {
impl<'kvs> log::kv::VisitSource<'kvs> for KvWriter<'_, 'kvs> {
fn visit_pair(
&mut self,
key: log::kv::Key<'kvs>,
Expand All @@ -61,7 +61,7 @@ struct KvCollector {
kv: Vec<(String, String)>,
}

impl<'kvs> log::kv::Visitor<'kvs> for KvCollector {
impl<'kvs> log::kv::VisitSource<'kvs> for KvCollector {
fn visit_pair(
&mut self,
key: log::kv::Key<'kvs>,
Expand Down

0 comments on commit f9313f5

Please sign in to comment.