From 8c30492c7a186414df01dade43024d1c73f20b4c Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 27 Jan 2023 14:30:28 +0000 Subject: formatting --- src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 434eb29..1b55c8f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,14 +12,15 @@ struct PAMUserCG; pam::pam_hooks!(PAMUserCG); fn create_and_open_dir + Copy>( - d: &Dir, path: P, - ) -> std::io::Result { + d: &Dir, + path: P, +) -> std::io::Result { match d.create_dir(path) { Ok(()) => Ok(()), Err(e) => match e.kind() { ErrorKind::AlreadyExists => Ok(()), _ => Err(e), - } + }, }?; d.open_dir(path) } @@ -47,7 +48,7 @@ impl PamHooks for PAMUserCG { fn sm_open_session( h: &mut PamHandle, _args: Vec<&CStr>, - _flags: PamFlag + _flags: PamFlag, ) -> PamResultCode { if open_session(h).is_ok() { PamResultCode::PAM_SUCCESS -- cgit v1.2.3-54-g00ecf