mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
use Bytes.unsafe_to_string
This commit is contained in:
parent
1e96404502
commit
0cd75d5a6d
1 changed files with 1 additions and 1 deletions
|
|
@ -612,7 +612,7 @@ module Trace_context = struct
|
|||
let buf = Bytes.create len in
|
||||
let* str =
|
||||
match Bytes.blit_string str offset buf 0 len with
|
||||
| () -> Ok (Bytes.to_string buf)
|
||||
| () -> Ok (Bytes.unsafe_to_string buf)
|
||||
| exception Invalid_argument _ -> Error or_
|
||||
in
|
||||
Ok (str, offset + len)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue