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(())
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[inline(always)]
|
||||
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)]
|
||||
fn set_raw_tls(&mut self, _: (&str, &str)) -> Result<()> {
|
||||
Ok(())
|
||||
// During unit testing, we don't want to actually read certs/keys.
|
||||
#[cfg(test)]
|
||||
{ Ok(()) }
|
||||
}
|
||||
|
||||
/// Sets the extras for `self` to be the key/value pairs in `extras`.
|
||||
|
|
Loading…
Reference in New Issue