File tree 3 files changed +21
-18
lines changed
3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,21 @@ use bytes::BytesMut;
74
74
use log:: { error, Log , Record } ;
75
75
use thiserror:: Error ;
76
76
77
+ #[ allow( dead_code) ] // TODO(https://github.com/rust-lang/rust/issues/120770): Remove when false positive is fixed.
77
78
#[ derive( Copy , Clone ) ]
78
79
#[ repr( transparent) ]
79
80
struct RecordFieldWrapper ( RecordField ) ;
81
+ #[ allow( dead_code) ] // TODO(https://github.com/rust-lang/rust/issues/120770): Remove when false positive is fixed.
80
82
#[ derive( Copy , Clone ) ]
81
83
#[ repr( transparent) ]
82
84
struct ArgumentWrapper ( Argument ) ;
83
85
#[ derive( Copy , Clone ) ]
84
86
#[ repr( transparent) ]
85
87
struct DisplayHintWrapper ( DisplayHint ) ;
86
88
87
- unsafe impl aya :: Pod for RecordFieldWrapper { }
88
- unsafe impl aya :: Pod for ArgumentWrapper { }
89
- unsafe impl aya :: Pod for DisplayHintWrapper { }
89
+ unsafe impl Pod for RecordFieldWrapper { }
90
+ unsafe impl Pod for ArgumentWrapper { }
91
+ unsafe impl Pod for DisplayHintWrapper { }
90
92
91
93
/// Log messages generated by `aya_log_ebpf` using the [log] crate.
92
94
///
Original file line number Diff line number Diff line change @@ -282,21 +282,6 @@ impl Drop for PerfBuffer {
282
282
}
283
283
}
284
284
285
- #[ derive( Debug ) ]
286
- #[ repr( C ) ]
287
- struct Sample {
288
- header : perf_event_header ,
289
- size : u32 ,
290
- }
291
-
292
- #[ repr( C ) ]
293
- #[ derive( Debug ) ]
294
- struct LostSamples {
295
- header : perf_event_header ,
296
- id : u64 ,
297
- count : u64 ,
298
- }
299
-
300
285
#[ cfg( test) ]
301
286
mod tests {
302
287
use std:: { fmt:: Debug , mem} ;
@@ -309,6 +294,13 @@ mod tests {
309
294
sys:: { override_syscall, Syscall , TEST_MMAP_RET } ,
310
295
} ;
311
296
297
+ #[ repr( C ) ]
298
+ #[ derive( Debug ) ]
299
+ struct Sample {
300
+ header : perf_event_header ,
301
+ size : u32 ,
302
+ }
303
+
312
304
const PAGE_SIZE : usize = 4096 ;
313
305
union MMappedBuf {
314
306
mmap_page : perf_event_mmap_page ,
@@ -375,6 +367,14 @@ mod tests {
375
367
} ;
376
368
fake_mmap ( & mmapped_buf) ;
377
369
370
+ #[ repr( C ) ]
371
+ #[ derive( Debug ) ]
372
+ struct LostSamples {
373
+ header : perf_event_header ,
374
+ id : u64 ,
375
+ count : u64 ,
376
+ }
377
+
378
378
let evt = LostSamples {
379
379
header : perf_event_header {
380
380
type_ : PERF_RECORD_LOST as u32 ,
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ pub(crate) fn lines(bytes: &[u8]) -> impl Iterator<Item = &OsStr> {
62
62
63
63
pub ( crate ) trait OsStringExt {
64
64
fn starts_with ( & self , needle : & OsStr ) -> bool ;
65
+ #[ allow( dead_code) ] // Would be odd to have the others without this one.
65
66
fn ends_with ( & self , needle : & OsStr ) -> bool ;
66
67
fn strip_prefix ( & self , prefix : & OsStr ) -> Option < & OsStr > ;
67
68
fn strip_suffix ( & self , suffix : & OsStr ) -> Option < & OsStr > ;
You can’t perform that action at this time.
0 commit comments