|
|
@ -15,7 +15,7 @@ pub enum NginxServerError<E: Error> { |
|
|
|
}
|
|
|
|
|
|
|
|
impl From<io::Error> for NginxServerError<io::Error> {
|
|
|
|
fn from(err: io::Error) -> NginxServerError<io::Error> {
|
|
|
|
fn from(err: io::Error) -> Self {
|
|
|
|
NginxServerError::ExecError(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -23,8 +23,8 @@ impl From<io::Error> for NginxServerError<io::Error> { |
|
|
|
impl<E: Error> Error for NginxServerError<E> {
|
|
|
|
fn description(&self) -> &str {
|
|
|
|
match self {
|
|
|
|
NginxServerError::ExecError(ref e) => e.description(),
|
|
|
|
NginxServerError::GenericError => "Generic error",
|
|
|
|
Self::ExecError(ref e) => e.description(),
|
|
|
|
Self::GenericError => "Generic error",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fn cause(&self) -> Option<&dyn Error> {
|
|
|
@ -75,7 +75,7 @@ server {{ |
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn php_server_config_snippet<'a, SOCKET: AsRef<Path>, STATIC: AsRef<Path>>(
|
|
|
|
pub fn php_server_config_snippet<SOCKET: AsRef<Path>, STATIC: AsRef<Path>>(
|
|
|
|
socket_path: SOCKET,
|
|
|
|
static_path: STATIC,
|
|
|
|
) -> String {
|
|
|
@ -109,7 +109,7 @@ pub struct LocalTcpSocket(usize); |
|
|
|
|
|
|
|
impl LocalTcpSocket {
|
|
|
|
pub fn new(x: usize) -> Self {
|
|
|
|
LocalTcpSocket(x)
|
|
|
|
Self(x)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|