Skip to content

Commit

Permalink
Fix warning, make them errors in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Dec 12, 2024
1 parent 0cb039d commit d2c76c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTDOCFLAGS: "-Dwarnings"
RUSTFLAGS: "-D warnings"

jobs:
test-latest:
Expand Down
3 changes: 2 additions & 1 deletion insta/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::{env, fmt, fs};

use crate::utils::{get_cargo, is_ci};
use crate::utils::is_ci;
use crate::{
content::{yaml, Content},
elog,
Expand Down Expand Up @@ -42,6 +42,7 @@ impl TestRunner {
/// Fall back to `cargo test` if `cargo nextest` isn't installed and
/// `test_runner_fallback` is true
pub fn resolve_fallback(&self, test_runner_fallback: bool) -> &TestRunner {
use crate::utils::get_cargo;
if self == &TestRunner::Nextest
&& test_runner_fallback
&& std::process::Command::new(get_cargo())
Expand Down
1 change: 1 addition & 0 deletions insta/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ pub fn format_rust_expression(value: &str) -> Cow<'_, str> {
Cow::Borrowed(value)
}

#[cfg(feature = "_cargo_insta_internal")]
pub fn get_cargo() -> std::ffi::OsString {
let cargo = env::var_os("CARGO");
let cargo = cargo
Expand Down

0 comments on commit d2c76c0

Please sign in to comment.