]> khamidou — GitHub mirrors - safetensors.git/commitdiff
Fix wrong docstring for SafeTensors' names method (#250) (#284)
authorAlvaro Moran <dirac3000@users.noreply.github.com>
Fri, 30 Jun 2023 07:16:05 +0000 (09:16 +0200)
committerGitHub <noreply@github.com>
Fri, 30 Jun 2023 07:16:05 +0000 (09:16 +0200)
safetensors/src/tensor.rs

index 5afbdd265087680e6eb29ee3d74585f26438e1d3..a2c2dce2f506e9e58841e7a9c1816a7e273a8df8 100644 (file)
@@ -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()
     }