Skip to content

Commit

Permalink
fix clippy & fmt errors
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
  • Loading branch information
andrei-ng committed Sep 8, 2023
1 parent 11ae6c3 commit 3e9ddae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions examples/basic_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ clap = {version = "4.2.7", features = ["cargo"]}
serde_json = "1.0.105"
serialport = "4.2.2"
ublox = {path = "../../ublox"}

[features]
alloc = ["ublox/alloc"]
5 changes: 4 additions & 1 deletion ublox/src/ubx_packets/packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ use crate::cfg_val::CfgVal;
use core::convert::TryInto;
use core::fmt;

#[cfg(feature = "alloc")]
use alloc::vec::Vec;

use bitflags::bitflags;
use chrono::prelude::*;
use num_traits::cast::{FromPrimitive, ToPrimitive};
Expand Down Expand Up @@ -2236,7 +2239,7 @@ struct CfgNav5 {
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
/// `CfgNav5` parameters bitmask
#[derive(Default, Debug)]
#[derive(Default, Debug, PartialEq, Eq)]
pub struct CfgNav5Params: u16 {
/// Apply dynamic model settings
const DYN = 1;
Expand Down
2 changes: 1 addition & 1 deletion ublox/tests/parser_binary_dump_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn test_parse_big_dump() {
let mut rng = thread_rng();
let mut i = 0;
while i < biglog.len() {
let chunk: usize = rng.gen_range(1, MAX_SIZE);
let chunk: usize = rng.gen_range(1..MAX_SIZE);
let chunk = (biglog.len() - i).min(chunk);
read_sizes.push(chunk);
i += chunk;
Expand Down

0 comments on commit 3e9ddae

Please sign in to comment.