Skip to content

Commit 51a691f

Browse files
committed
fix: linting, cargo-deny
1 parent 913b56b commit 51a691f

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ charon-eth2 = { path = "crates/charon-eth2" }
5656
charon-k1util = { path = "crates/charon-k1util" }
5757
charon-p2p = { path = "crates/charon-p2p" }
5858
charon-testutil = { path = "crates/charon-testutil" }
59-
charon-tracing = { path = "crates/charon-tracing" }
6059

6160
[workspace.lints.rust]
6261
missing_docs = "deny"

crates/tracing/examples/basic.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,21 @@ async fn main() {
3333

3434
let background_task = init(&config)
3535
.expect("Failed to initialize tracing")
36-
.unwrap();
36+
.expect("Background task should be Some");
3737

3838
tokio::spawn(background_task);
3939

4040
let bind_address = SocketAddr::from(([0, 0, 0, 0], 9464));
4141

42-
let exporter = MetricsExporter::default().bind(bind_address).await.unwrap();
42+
let exporter = MetricsExporter::default()
43+
.bind(bind_address)
44+
.await
45+
.expect("Failed to bind metrics exporter");
4346
tokio::spawn(async move {
44-
exporter.start().await.unwrap();
47+
exporter
48+
.start()
49+
.await
50+
.expect("Failed to start metrics exporter");
4551
});
4652

4753
// Test various log levels

crates/tracing/src/layers/metrics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ impl<S: tracing::Subscriber> tracing_subscriber::Layer<S> for MetricsLayer {
1818
_ctx: tracing_subscriber::layer::Context<'_, S>,
1919
) {
2020
// check level
21-
match event.metadata().level() {
22-
&tracing::Level::ERROR => {
21+
match *event.metadata().level() {
22+
tracing::Level::ERROR => {
2323
inc_error_count();
2424
}
25-
&tracing::Level::WARN => {
25+
tracing::Level::WARN => {
2626
inc_warn_count();
2727
}
2828
_ => {

0 commit comments

Comments
 (0)