Skip to content

Commit faaf808

Browse files
authored
chore(api): fix clippy errors (#375)
Needed for #374. This configures clippy to ignore most of the generated code in `console-api`.
1 parent 3bf60bc commit faaf808

File tree

7 files changed

+17
-3
lines changed

7 files changed

+17
-3
lines changed

console-api/src/async_ops.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#![allow(warnings)]
2+
13
include!("generated/rs.tokio.console.async_ops.rs");

console-api/src/common.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
use std::fmt;
22
use std::hash::{Hash, Hasher};
33

4-
include!("generated/rs.tokio.console.common.rs");
4+
pub use generated::*;
5+
6+
mod generated {
7+
#![allow(warnings)]
8+
include!("generated/rs.tokio.console.common.rs");
9+
}
510

611
impl From<tracing_core::Level> for metadata::Level {
712
fn from(level: tracing_core::Level) -> Self {

console-api/src/instrument.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#![allow(warnings)]
2+
13
include!("generated/rs.tokio.console.instrument.rs");

console-api/src/resources.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#![allow(warnings)]
2+
13
include!("generated/rs.tokio.console.resources.rs");

console-api/src/tasks.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#![allow(warnings)]
2+
13
include!("generated/rs.tokio.console.tasks.rs");

console-api/src/trace.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#![allow(warnings)]
2+
13
include!("generated/rs.tokio.console.trace.rs");

console-subscriber/examples/barrier.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
1616
let task_name = format!("task-{}", i);
1717
handles.push(task::Builder::default().name(&task_name).spawn(async move {
1818
tokio::time::sleep(Duration::from_secs(i)).await;
19-
let wait_result = c.wait().await;
20-
wait_result
19+
c.wait().await
2120
}));
2221
}
2322

0 commit comments

Comments
 (0)