Skip to content

Commit

Permalink
chore(api): fix clippy errors (#375)
Browse files Browse the repository at this point in the history
Needed for #374.

This configures clippy to ignore most of the generated code in
`console-api`.
  • Loading branch information
Noah-Kennedy authored and hawkw committed Sep 29, 2023
1 parent ba93c85 commit c903b33
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions console-api/src/async_ops.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#![allow(warnings)]

include!("generated/rs.tokio.console.async_ops.rs");
7 changes: 6 additions & 1 deletion console-api/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
use std::fmt;
use std::hash::{Hash, Hasher};

include!("generated/rs.tokio.console.common.rs");
pub use generated::*;

mod generated {
#![allow(warnings)]
include!("generated/rs.tokio.console.common.rs");
}

impl From<tracing_core::Level> for metadata::Level {
fn from(level: tracing_core::Level) -> Self {
Expand Down
2 changes: 2 additions & 0 deletions console-api/src/instrument.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#![allow(warnings)]

include!("generated/rs.tokio.console.instrument.rs");
2 changes: 2 additions & 0 deletions console-api/src/resources.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#![allow(warnings)]

include!("generated/rs.tokio.console.resources.rs");
2 changes: 2 additions & 0 deletions console-api/src/tasks.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#![allow(warnings)]

include!("generated/rs.tokio.console.tasks.rs");
2 changes: 2 additions & 0 deletions console-api/src/trace.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#![allow(warnings)]

include!("generated/rs.tokio.console.trace.rs");
3 changes: 1 addition & 2 deletions console-subscriber/examples/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let task_name = format!("task-{}", i);
handles.push(task::Builder::default().name(&task_name).spawn(async move {
tokio::time::sleep(Duration::from_secs(i)).await;
let wait_result = c.wait().await;
wait_result
c.wait().await
}));
}

Expand Down

0 comments on commit c903b33

Please sign in to comment.