Skip to content

Commit

Permalink
Fix typos (#638)
Browse files Browse the repository at this point in the history
Running `pre-commit` caught a couple things
  • Loading branch information
max-sixty authored Oct 5, 2024
1 parent a07a244 commit 915afdc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cargo-insta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ walkdir = "2.3.1"
similar= "2.2.1"
itertools = "0.10.0"
termcolor = "1.1.2"
os_pipe = "0.9.0"
os_pipe = "0.9.0"
2 changes: 1 addition & 1 deletion cargo-insta/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ fn handle_target_args<'a>(
.iter()
.map(|x| {
if let Some(no_period) = x.strip_prefix(".") {
eprintln!("`{}` supplied as an extenstion. This will use `foo.{}` as file names; likely you want `{}` instead.", x, x, no_period)
eprintln!("`{}` supplied as an extension. This will use `foo.{}` as file names; likely you want `{}` instead.", x, x, no_period)
};
x.as_str()
})
Expand Down
8 changes: 6 additions & 2 deletions cargo-insta/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
/// .args(["test"])
/// .stderr(Stdio::piped())
///
/// assert!(String::from_utf8_lossy(&output.stderr).contains("info: 2 snapshots to review")
/// assert!(
/// String::from_utf8_lossy(&output.stderr).contains("info: 2 snapshots to review"),
/// "{}",
/// String::from_utf8_lossy(&output.stderr)
/// );
/// ```
///
/// Often we want to see output from the test commands we run here; for example
/// a `dbg!` statement we add while debugging. Cargo by default hides the output
/// a `dbg` statement we add while debugging. Cargo by default hides the output
/// of passing tests.
/// - Like any test, to forward the output of a passing outer test (i.e. one of
/// the `#[test]`s in this file) to the terminal, pass `--nocapture` to the
Expand Down
2 changes: 1 addition & 1 deletion insta/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl<'a> SnapshotAssertionContext<'a> {
}

/// Removes any old .snap.new.* files that belonged to previous pending snapshots. This should
/// only ever remove maxium one file because we do this every time before we create a new
/// only ever remove maximum one file because we do this every time before we create a new
/// pending snapshot.
pub fn cleanup_previous_pending_binary_snapshots(&self) -> Result<(), Box<dyn Error>> {
if let Some(ref path) = self.snapshot_file {
Expand Down

0 comments on commit 915afdc

Please sign in to comment.