From e4c59dd61a7e1bbfbde87020cc2afc18d8cdc52d Mon Sep 17 00:00:00 2001 From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Date: Sun, 6 Oct 2024 11:34:42 -0700 Subject: [PATCH] Fix a couple docstrings (#641) --- insta/src/snapshot.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/insta/src/snapshot.rs b/insta/src/snapshot.rs index 0130f546..a11ca207 100644 --- a/insta/src/snapshot.rs +++ b/insta/src/snapshot.rs @@ -424,7 +424,6 @@ impl Snapshot { )) } - /// Creates an empty snapshot. pub(crate) fn from_components( module_name: String, snapshot_name: Option, @@ -604,8 +603,10 @@ impl Snapshot { /// Same as [`Self::save`] but instead of writing a normal snapshot file this will write /// a `.snap.new` file with additional information. /// - /// The name of the new snapshot file is returned. + /// The path of the new snapshot file is returned. pub(crate) fn save_new(&self, path: &Path) -> Result> { + // TODO: should we be the actual extension here rather than defaulting + // to the standard `.snap`? let new_path = path.to_path_buf().with_extension("snap.new"); self.save_with_metadata(&new_path, &self.metadata)?; Ok(new_path)