summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 57d46be7..f7957d84 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1958,10 +1958,9 @@ impl Bindings {
}
}
#[cfg(not(feature = "which-rustfmt"))]
- Err(io::Error::new(
- io::ErrorKind::Other,
- "which wasn't enabled, and no rustfmt binary specified",
- ))
+ // No rustfmt binary was specified, so assume that the binary is called
+ // "rustfmt" and that it is in the user's PATH.
+ Ok(Cow::Owned("rustfmt".into()))
}
/// Checks if rustfmt_bindings is set and runs rustfmt on the string