mirror of https://github.com/rwf2/Rocket.git
Improve 'Config::set_raw_tls()' implementation.
This commit is contained in:
parent
88d3b59c71
commit
bd6cdecf00
|
@ -584,15 +584,14 @@ impl Config {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn set_raw_tls(&mut self, paths: (&str, &str)) -> Result<()> {
|
fn set_raw_tls(&mut self, paths: (&str, &str)) -> Result<()> {
|
||||||
self.set_tls(paths.0, paths.1)
|
#[cfg(not(test))]
|
||||||
}
|
{ self.set_tls(paths.0, paths.1) }
|
||||||
|
|
||||||
#[cfg(test)]
|
// During unit testing, we don't want to actually read certs/keys.
|
||||||
fn set_raw_tls(&mut self, _: (&str, &str)) -> Result<()> {
|
#[cfg(test)]
|
||||||
Ok(())
|
{ Ok(()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the extras for `self` to be the key/value pairs in `extras`.
|
/// Sets the extras for `self` to be the key/value pairs in `extras`.
|
||||||
|
|
Loading…
Reference in New Issue