File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
examples/tracing-grpc/src
opentelemetry-appender-log/src
opentelemetry-stdout/src/trace Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fn init_tracer() -> sdktrace::TracerProvider {
2222
2323struct MetadataMap < ' a > ( & ' a mut tonic:: metadata:: MetadataMap ) ;
2424
25- impl < ' a > Injector for MetadataMap < ' a > {
25+ impl Injector for MetadataMap < ' _ > {
2626 /// Set a key and value in the MetadataMap. Does nothing if the key or value are not valid inputs
2727 fn set ( & mut self , key : & str , value : String ) {
2828 if let Ok ( key) = tonic:: metadata:: MetadataKey :: from_bytes ( key. as_bytes ( ) ) {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub mod hello_world {
2929
3030struct MetadataMap < ' a > ( & ' a tonic:: metadata:: MetadataMap ) ;
3131
32- impl < ' a > Extractor for MetadataMap < ' a > {
32+ impl Extractor for MetadataMap < ' _ > {
3333 /// Get a value for a key from the MetadataMap. If the value can't be converted to &str, returns None
3434 fn get ( & self , key : & str ) -> Option < & str > {
3535 self . 0 . get ( key) . and_then ( |metadata| metadata. to_str ( ) . ok ( ) )
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ mod any_value {
239239 pub ( crate ) fn serialize ( value : log:: kv:: Value ) -> Option < AnyValue > {
240240 struct ValueVisitor ( Option < AnyValue > ) ;
241241
242- impl < ' kvs > log:: kv:: VisitValue < ' kvs > for ValueVisitor {
242+ impl log:: kv:: VisitValue < ' _ > for ValueVisitor {
243243 fn visit_any ( & mut self , value : log:: kv:: Value ) -> Result < ( ) , log:: kv:: Error > {
244244 self . 0 = Some ( AnyValue :: String ( StringValue :: from ( value. to_string ( ) ) ) ) ;
245245
Original file line number Diff line number Diff line change 11use chrono:: { DateTime , Utc } ;
22use core:: fmt;
33use futures_util:: future:: BoxFuture ;
4- use opentelemetry:: trace:: { TraceError , TraceResult } ;
4+ use opentelemetry:: trace:: { TraceError } ;
55use opentelemetry_sdk:: export:: trace:: ShutdownResult ;
66use opentelemetry_sdk:: export:: { self , trace:: ExportResult } ;
77use opentelemetry_sdk:: resource:: Resource ;
Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ struct UnsafeSlice<'a> {
140140 slice : & ' a [ UnsafeCell < WorkerStats > ] ,
141141}
142142
143- unsafe impl < ' a > Send for UnsafeSlice < ' a > { }
144- unsafe impl < ' a > Sync for UnsafeSlice < ' a > { }
143+ unsafe impl Send for UnsafeSlice < ' _ > { }
144+ unsafe impl Sync for UnsafeSlice < ' _ > { }
145145
146146impl < ' a > UnsafeSlice < ' a > {
147147 fn new ( slice : & ' a mut [ WorkerStats ] ) -> Self {
@@ -155,7 +155,7 @@ impl<'a> UnsafeSlice<'a> {
155155 #[ inline( always) ]
156156 unsafe fn increment ( & self , i : usize ) {
157157 let value = self . slice [ i] . get ( ) ;
158- ( * value) . count = ( * value ) . count + 1 ;
158+ ( * value) . count += 1 ;
159159 }
160160
161161 #[ inline( always) ]
You can’t perform that action at this time.
0 commit comments