From 4e3e5450f5c1140489e646e70b27dd8db7060b2a Mon Sep 17 00:00:00 2001 From: Alvaro Moran Date: Fri, 30 Jun 2023 09:16:05 +0200 Subject: [PATCH] Fix wrong docstring for SafeTensors' names method (#250) (#284) --- safetensors/src/tensor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/safetensors/src/tensor.rs b/safetensors/src/tensor.rs index 5afbdd2..a2c2dce 100644 --- a/safetensors/src/tensor.rs +++ b/safetensors/src/tensor.rs @@ -374,9 +374,9 @@ impl<'data> SafeTensors<'data> { } } - /// Allow the user to get a specific tensor within the SafeTensors. - /// The tensor returned is merely a view and the data is not owned by this - /// structure. + /// Return the names of the tensors within the SafeTensors. + /// These are used as keys to access to the actual tensors, that can be + /// retrieved using the tensor method. pub fn names(&self) -> Vec<&'_ String> { self.metadata.index_map.keys().collect() } -- 2.43.0