Stay at MSRV 1.42.0

This commit is contained in:
David Bürgin 2021-08-01 14:54:02 +02:00
parent f9db6eb11e
commit 53e66eba0d
3 changed files with 5 additions and 8 deletions

View file

@ -5,7 +5,7 @@
* Invoke `spamc` using the absolute path `/usr/bin/spamc`. To customise this,
set the environment variable `SPAMASSASSIN_MILTER_SPAMC` to the desired path
when building the application.
* The minimum supported Rust version is now 1.46.0.
* Update dependencies.
## 0.1.6 (2021-05-17)

View file

@ -61,7 +61,7 @@ recently, `miltertest` had a serious bug that prevents most integration tests in
this package from completing; make sure you use an up-to-date version of
`miltertest`.)
The minimum supported Rust version is 1.46.0.
The minimum supported Rust version is 1.42.0.
[Rust]: https://www.rust-lang.org

View file

@ -26,11 +26,6 @@ pub struct Spamc {
}
impl Spamc {
const SPAMC_PROGRAM: &'static str = match option_env!("SPAMASSASSIN_MILTER_SPAMC") {
Some(p) => p,
None => "/usr/bin/spamc",
};
pub fn new(spamc_args: &'static [String]) -> Self {
Self {
spamc_args,
@ -42,9 +37,11 @@ impl Spamc {
impl Process for Spamc {
fn connect(&mut self) -> Result<()> {
let spamc_program = option_env!("SPAMASSASSIN_MILTER_SPAMC").unwrap_or("/usr/bin/spamc");
// `Command::spawn` always succeeds when `spamc` can be invoked, even if
// logically the command is invalid, eg if it uses non-existing options.
let mut spamc = Command::new(Spamc::SPAMC_PROGRAM)
let mut spamc = Command::new(spamc_program)
.args(self.spamc_args)
.stdin(Stdio::piped())
.stdout(Stdio::piped())