refactor(mqtt): replace the too_many_arguments suppressions in embedded/ with a context struct

Abierto
#461 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
embedded-iot

Línea de trabajo

Read the seven clippy::too_many_arguments sites listed in aimdb-mqtt-connector/src/embedded/session_loop.rs, session.rs, tls.rs, and mod.rs, then trace which parameters they share. Group the common parameters into one or two context structs and remove the suppressions that are no longer needed. Run make test-embedded and the bench gate; done means the checks pass without increasing future sizes on the embedded target.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

📱 embedded enhancement

Problem

aimdb-mqtt-connector/src/embedded/ suppresses clippy::too_many_arguments in seven places:

  • session_loop.rs:81, :152, :310
  • session.rs:50
  • tls.rs:317
  • mod.rs:370, :428

The same group of parameters is evidently threaded through the session entry points, the session loop and the TLS path. That usually means a missing "session context" struct: adding one more piece of state today means touching every signature in the chain.

The crate also has the most features in the workspace (17 in aimdb-mqtt-connector/Cargo.toml), and mod.rs:489 / :516 carry #[allow(unreachable_code)], so this is the connector where configuration complexity is highest.

Suggested work

  • Identify the parameters common to those seven functions and group them into one or two structs (e.g. connection config vs. per-session buffers/channels), passed by reference.
  • Remove the too_many_arguments allows that become unnecessary.
  • Check that the change does not grow future sizes on the embedded target (make test-embedded and the bench gate).

Notes

Found from the lint suppressions alone at d9c7be0; I did not trace each signature, so how many of the seven collapse onto the same struct is to be confirmed when doing the work.

Lenguaje dominante
Rust
Estrellas
101
Forks
20
Merge medio
2 h 33 min
PR fusionados (30 d)
90

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aimdb-dev/aimdb

Todos los issues de aimdb-dev/aimdb

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.