Skip to content

Commit

Permalink
Fix a couple docstrings (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Oct 6, 2024
1 parent 0e7865f commit e4c59dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions insta/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ impl Snapshot {
))
}

/// Creates an empty snapshot.
pub(crate) fn from_components(
module_name: String,
snapshot_name: Option<String>,
Expand Down Expand Up @@ -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<PathBuf, Box<dyn Error>> {
// 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)
Expand Down

0 comments on commit e4c59dd

Please sign in to comment.