From 0cd75d5a6d3709637391fd67f023a5ce94f4a966 Mon Sep 17 00:00:00 2001 From: Matt Bray Date: Thu, 24 Mar 2022 17:36:45 +0000 Subject: [PATCH] use Bytes.unsafe_to_string --- src/opentelemetry.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opentelemetry.ml b/src/opentelemetry.ml index 60da40b7..f4c59e5a 100644 --- a/src/opentelemetry.ml +++ b/src/opentelemetry.ml @@ -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)