mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
Fixing more warnings
This commit is contained in:
parent
68418161d7
commit
e6cb1a958d
@ -9,7 +9,7 @@ use std::time::Duration;
|
|||||||
use futures::{future::BoxFuture, Stream};
|
use futures::{future::BoxFuture, Stream};
|
||||||
use futures::channel::mpsc;
|
use futures::channel::mpsc;
|
||||||
use futures_signals::signal::Signal;
|
use futures_signals::signal::Signal;
|
||||||
use rumqttc::{AsyncClient, ConnectionError, Event, Incoming, MqttOptions, OptionError, Transport};
|
use rumqttc::{AsyncClient, ConnectionError, Event, Incoming, MqttOptions};
|
||||||
|
|
||||||
use crate::db::machine::MachineState;
|
use crate::db::machine::MachineState;
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
@ -19,7 +19,7 @@ use crate::network::ActorMap;
|
|||||||
use slog::Logger;
|
use slog::Logger;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
use crate::Error::{BadConfiguration, MQTTConnectionError};
|
use crate::Error::{MQTTConnectionError};
|
||||||
|
|
||||||
pub trait Actuator {
|
pub trait Actuator {
|
||||||
fn apply(&mut self, state: MachineState) -> BoxFuture<'static, ()>;
|
fn apply(&mut self, state: MachineState) -> BoxFuture<'static, ()>;
|
||||||
@ -139,11 +139,11 @@ pub fn load(log: &Logger, config: &Config) -> Result<(ActorMap, Vec<Actor>)> {
|
|||||||
.map_err(|opt| Error::Boxed(Box::new(opt)))?;
|
.map_err(|opt| Error::Boxed(Box::new(opt)))?;
|
||||||
mqttoptions.set_keep_alive(Duration::from_secs(20));
|
mqttoptions.set_keep_alive(Duration::from_secs(20));
|
||||||
|
|
||||||
let (mut mqtt, mut eventloop) = AsyncClient::new(mqttoptions, 256);
|
let (mqtt, mut eventloop) = AsyncClient::new(mqttoptions, 256);
|
||||||
let dlog = log.clone();
|
let dlog = log.clone();
|
||||||
let mut eventloop = smol::block_on(async move {
|
let mut eventloop = smol::block_on(async move {
|
||||||
match eventloop.poll().await {
|
match eventloop.poll().await {
|
||||||
Ok(Event::Incoming(Incoming::Connect(connect))) => {},
|
Ok(Event::Incoming(Incoming::Connect(_connect))) => {},
|
||||||
Ok(e) => {
|
Ok(e) => {
|
||||||
warn!(dlog, "Got unexpected mqtt event {:?}", e);
|
warn!(dlog, "Got unexpected mqtt event {:?}", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user