File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use data_pipeline::trace_exporter::{
55 TraceExporterOutputFormat ,
66} ;
77use pyo3:: { exceptions:: PyValueError , prelude:: * , pybacked:: PyBackedBytes } ;
8- use tinybytes:: Bytes ;
98mod exceptions;
109
1110/// A wrapper arround [TraceExporterBuilder]
@@ -186,15 +185,13 @@ impl TraceExporterPy {
186185 /// sending the traces.
187186 fn send ( & self , py : Python < ' _ > , data : PyBackedBytes , trace_count : usize ) -> PyResult < String > {
188187 py. allow_threads ( move || {
189- let slice: & [ u8 ] = & data;
190- let slice: & ' static [ u8 ] = unsafe { std:: mem:: transmute ( slice) } ;
191188 match self
192189 . inner
193190 . as_ref ( )
194191 . ok_or ( PyValueError :: new_err (
195192 "TraceExporter has already been consumed" ,
196193 ) ) ?
197- . send ( Bytes :: from_static ( slice ) , trace_count)
194+ . send ( & data , trace_count)
198195 {
199196 Ok ( res) => Ok ( res. body ) ,
200197 Err ( e) => Err ( exceptions:: TraceExporterErrorPy :: from ( e) . into ( ) ) ,
You can’t perform that action at this time.
0 commit comments