mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 20:33:36 -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 buf = Bytes.create len in
|
||||||
let* str =
|
let* str =
|
||||||
match Bytes.blit_string str offset buf 0 len with
|
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_
|
| exception Invalid_argument _ -> Error or_
|
||||||
in
|
in
|
||||||
Ok (str, offset + len)
|
Ok (str, offset + len)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue