~kennylevinsen/greetd

755c42b8d8d72595ec38e1a5bb54e83a7b9f2ce0 — Hugo Osvaldo Barrera 1 year, 3 days ago 9c97b6a
Remove references that are implicitly dereferenced

This are implicitly dereferenced by the compiler and a no-op.
M agreety/src/main.rs => agreety/src/main.rs +5 -5
@@ 44,11 44,11 @@ fn get_issue() -> Result<String, Box<dyn std::error::Error>> {
            &get_distro_name().unwrap_or_else(|_| "Linux".to_string()),
        )
        .replace("\\l", &format!("tty{}", vtnr))
        .replace("\\s", &uts.sysname().to_str().unwrap())
        .replace("\\r", &uts.release().to_str().unwrap())
        .replace("\\v", &uts.version().to_str().unwrap())
        .replace("\\n", &uts.nodename().to_str().unwrap())
        .replace("\\m", &uts.machine().to_str().unwrap())
        .replace("\\s", uts.sysname().to_str().unwrap())
        .replace("\\r", uts.release().to_str().unwrap())
        .replace("\\v", uts.version().to_str().unwrap())
        .replace("\\n", uts.nodename().to_str().unwrap())
        .replace("\\m", uts.machine().to_str().unwrap())
        .replace("\\\\", "\\"))
}


M fakegreet/src/main.rs => fakegreet/src/main.rs +2 -2
@@ 128,12 128,12 @@ async fn client_handler(ctx: &Context, mut s: UnixStream) -> Result<(), Error> {
        println!("req: {:?}", req);
        let resp = match req {
            Request::CreateSession { username } => match ctx.create_session(username).await {
                Ok(()) => client_get_question(&ctx).await,
                Ok(()) => client_get_question(ctx).await,
                res => wrap_result(res),
            },
            Request::PostAuthMessageResponse { response } => {
                match ctx.post_response(response).await {
                    Ok(()) => client_get_question(&ctx).await,
                    Ok(()) => client_get_question(ctx).await,
                    res => wrap_result(res),
                }
            }

M greetd/src/context.rs => greetd/src/context.rs +1 -1
@@ 90,7 90,7 @@ impl Context {
        let mut scheduled_session = Session::new_external()?;
        scheduled_session
            .initiate(
                &service,
                service,
                class,
                user,
                false,

M greetd/src/pam/session.rs => greetd/src/pam/session.rs +1 -1
@@ 29,7 29,7 @@ impl<'a> PamSession<'a> {
        pam_conv: Pin<Box<dyn Converse + 'a>>,
    ) -> Result<PamSession<'a>, PamError> {
        let mut pch = Box::pin(PamConvHandlerWrapper { handler: pam_conv });
        let conv = make_conversation(&mut *pch);
        let conv = make_conversation(&mut pch);
        let mut pam_handle: *mut PamHandle = ptr::null_mut();

        match pam_sys::start(service, Some(user), &conv, &mut pam_handle) {

M greetd/src/server.rs => greetd/src/server.rs +2 -2
@@ 76,12 76,12 @@ async fn client_handler(ctx: &Context, mut s: UnixStream) -> Result<(), Error> {

        let resp = match req {
            Request::CreateSession { username } => match ctx.create_session(username).await {
                Ok(()) => client_get_question(&ctx).await,
                Ok(()) => client_get_question(ctx).await,
                res => wrap_result(res),
            },
            Request::PostAuthMessageResponse { response } => {
                match ctx.post_response(response).await {
                    Ok(()) => client_get_question(&ctx).await,
                    Ok(()) => client_get_question(ctx).await,
                    res => wrap_result(res),
                }
            }

M inish/src/lib.rs => inish/src/lib.rs +1 -1
@@ 31,7 31,7 @@ pub fn parse<'a>(s: &'a str) -> Result<Inish<'a>, Box<dyn Error>> {
                sections.insert(current_section_name, current_section);
                current_section = HashMap::new();
                let len = line.bytes().count();
                current_section_name = &line[1..len - 1].trim();
                current_section_name = line[1..len - 1].trim();
            }
            (Some('['), v) => {
                return Err(format!(