Skip to content

Commit

Permalink
Fix nightly clippy errors
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz Gies <[email protected]>
  • Loading branch information
Licenser committed Mar 20, 2024
1 parent 8f4a9c2 commit a08217b
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ macro_rules! stry {
#[cfg(test)]
mod test {
use crate::prelude::*;
use crate::{json, json_typed, BorrowedValue, OwnedValue};
use crate::{BorrowedValue, OwnedValue};

#[cfg(feature = "serde_impl")]
fn owned_test_map() -> OwnedValue {
Expand Down
3 changes: 1 addition & 2 deletions src/numberparse/approx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ use super::{
};
use crate::charutils::is_structural_or_whitespace;
use crate::safer_unchecked::GetSaferUnchecked;
use crate::unlikely;
use crate::StaticNode;
use crate::{static_cast_i64, Deserializer, ErrorType, Result};
use crate::{Deserializer, ErrorType, Result};

const POWER_OF_TEN: [f64; 632] = [
1e-323, 1e-322, 1e-321, 1e-320, 1e-319, 1e-318, 1e-317, 1e-316, 1e-315, 1e-314, 1e-313, 1e-312,
Expand Down
1 change: 0 additions & 1 deletion src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ mod test {
use serde::{Deserialize, Serialize};
use serde_json::{json as sjson, to_string as sto_string, Value as SerdeValue};
use std::collections::BTreeMap;
use std::convert::TryInto;

#[derive(Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
struct UnitStruct;
Expand Down
1 change: 0 additions & 1 deletion src/serde/value/borrowed/se.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ mod test {
use super::Value;
use crate::{borrowed::Object, serde::from_slice, ObjectHasher};
use serde::{Deserialize, Serialize};
use serde_json;
use value_trait::StaticNode;

#[test]
Expand Down
1 change: 0 additions & 1 deletion src/serde/value/owned/se.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ mod test {
#[cfg(not(target_arch = "wasm32"))]
use crate::serde::{from_str, to_string};
use serde::{Deserialize, Serialize};
use serde_json;

#[derive(Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
struct UnitStruct;
Expand Down
1 change: 0 additions & 1 deletion src/value/borrowed/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ where
mod test {
use super::Value;
use crate::prelude::*;
use crate::StaticNode;

#[test]
fn null() {
Expand Down
2 changes: 1 addition & 1 deletion src/value/owned/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ where
mod test {
use super::Value;
use crate::prelude::*;
use crate::StaticNode;

#[test]
fn null() {
assert_eq!(Value::Static(StaticNode::Null).encode(), "null");
Expand Down
1 change: 1 addition & 0 deletions src/value/tape/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl<'tape, 'input> IntoIterator for &Array<'tape, 'input> {
self.iter()
}
}

#[cfg(test)]
mod test {
use crate::to_tape;
Expand Down
4 changes: 1 addition & 3 deletions tests/serenity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
mod test {

pub(crate) mod snowflake {
use std::convert::TryFrom;
use std::fmt;

use serde::de::{Error, Visitor};
use serde::{Deserializer, Serializer};
use std::fmt;

pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<u64, D::Error> {
deserializer.deserialize_any(SnowflakeVisitor)
Expand Down

0 comments on commit a08217b

Please sign in to comment.