style: minor clippy stuff
This commit is contained in:
parent
24eb77d78f
commit
6765fe930b
3 changed files with 6 additions and 5 deletions
|
@ -111,8 +111,10 @@ pub fn parse_packet(input: &str) -> MyIError<&str, NMDeviceDataPacket> {
|
||||||
|
|
||||||
let (input, opt_name) = opt(delimited(tag("#"), take_while(|c| c != '\n'), tag("\n")))(input)?;
|
let (input, opt_name) = opt(delimited(tag("#"), take_while(|c| c != '\n'), tag("\n")))(input)?;
|
||||||
|
|
||||||
let mut packet = NMDeviceDataPacket::default();
|
let mut packet = NMDeviceDataPacket {
|
||||||
packet.mac = device_mac;
|
mac: device_mac,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
let (input, lines) = context(
|
let (input, lines) = context(
|
||||||
"Получение значений до тега терминатора",
|
"Получение значений до тега терминатора",
|
||||||
|
|
|
@ -8,7 +8,6 @@ mod utils;
|
||||||
mod web_server;
|
mod web_server;
|
||||||
use crate::web_server::server_main;
|
use crate::web_server::server_main;
|
||||||
|
|
||||||
struct Params {}
|
|
||||||
|
|
||||||
#[ntex::main]
|
#[ntex::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use hifitime::Epoch;
|
use hifitime::Epoch;
|
||||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::{Formatter, Write};
|
use std::fmt::Formatter;
|
||||||
|
|
||||||
#[derive(PartialOrd, PartialEq, Ord, Eq, Clone, Copy, Debug, Default)]
|
#[derive(PartialOrd, PartialEq, Ord, Eq, Clone, Copy, Debug, Default)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
|
@ -30,7 +30,7 @@ impl<'de> Deserialize<'de> for EpochUTC {
|
||||||
{
|
{
|
||||||
struct EpochVisitor;
|
struct EpochVisitor;
|
||||||
|
|
||||||
impl<'de> de::Visitor<'de> for EpochVisitor {
|
impl de::Visitor<'_> for EpochVisitor {
|
||||||
type Value = EpochUTC;
|
type Value = EpochUTC;
|
||||||
|
|
||||||
fn expecting(&self, formatter: &mut Formatter) -> fmt::Result {
|
fn expecting(&self, formatter: &mut Formatter) -> fmt::Result {
|
||||||
|
|
Loading…
Add table
Reference in a new issue