Skip to content

Commit

Permalink
chore: fix clippy improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kaans committed Nov 15, 2024
1 parent 63aa3a4 commit 45804be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/mqtli_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ pub enum MqttProtocol {

#[derive(Clone, Debug, Getters, Validate)]
#[validate(schema(function = "validate_credentials", skip_on_field_errors = false))]
#[validate(schema(function = "validate_tls_client", skip_on_field_errors = false))]
#[validate(schema(function = "validate_tls_client"))]
pub struct MqttBrokerConnectArgs {
#[validate(length(min = 1, message = "Hostname must be given"))]
host: String,
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt/mqtt_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl MqttHandler {
}
}

pub fn handle_event(event: MqttEvent, topics: &Vec<Topic>) {
pub fn handle_event(event: MqttEvent, topics: &[Topic]) {
match event {
MqttEvent::V5(event) => {
v5::handle_event(event, topics);
Expand Down Expand Up @@ -154,7 +154,7 @@ mod v311 {
use crate::mqtt::mqtt_handler::MqttHandler;
use crate::mqtt::QoS;

pub fn handle_event(event: Event, topics: &Vec<Topic>) {
pub fn handle_event(event: Event, topics: &[Topic]) {
match event {
Event::Incoming(event) => {
if let Incoming::Publish(value) = event {
Expand Down
1 change: 1 addition & 0 deletions src/publish/trigger_periodic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ impl TriggerPeriodic {
)
}

#[allow(clippy::too_many_arguments)]
fn create_job_repeated_count(
contexts: Arc<Mutex<JobContextStorage>>,
interval: &Duration,
Expand Down

0 comments on commit 45804be

Please sign in to comment.