From: Alvaro Moran Date: Fri, 30 Jun 2023 07:16:05 +0000 (+0200) Subject: Fix wrong docstring for SafeTensors' names method (#250) (#284) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4e3e5450f5c1140489e646e70b27dd8db7060b2a;p=safetensors.git Fix wrong docstring for SafeTensors' names method (#250) (#284) --- 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() }