Skip to content

Commit

Permalink
Clippy / fix juniper_support misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
dnsl48 committed Aug 27, 2023
1 parent d36d4b7 commit 6e8e183
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/fraction/juniper_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ mod tests {
use super::*;
use juniper::{FromInputValue, InputValue, ToInputValue};

#[cfg(feature = "with-bigint")]
use crate::BigFraction;

type F = GenericFraction<u8>;
fn get_tests() -> Vec<(&'static str, F)> {
vec![
Expand All @@ -171,8 +174,9 @@ mod tests {
]
}

#[cfg(features = "with-bigint")]
#[cfg(feature = "with-bigint")]
fn get_big_tests() -> Vec<(&'static str, BigFraction)> {
use crate::Num;
vec![
("NaN", BigFraction::nan()),
("-inf", BigFraction::neg_infinity()),
Expand Down Expand Up @@ -206,7 +210,7 @@ mod tests {
assert_eq!(s, str_value.unwrap());
}

#[cfg(features = "with-bigint")]
#[cfg(feature = "with-bigint")]
{
for (s, v) in get_big_tests() {
let value = <BigFraction as ToInputValue>::to_input_value(&v);
Expand All @@ -225,11 +229,11 @@ mod tests {
assert_eq!(value, Some(v));
}

#[cfg(features = "with-bigint")]
#[cfg(feature = "with-bigint")]
{
for (s, v) in get_big_tests() {
let value =
<BigFraction as FromInputValue>::from_input_value(&InputValue::string(s));
<BigFraction as FromInputValue>::from_input_value(&InputValue::scalar(s));
assert_eq!(value, Some(v));
}
}
Expand Down

0 comments on commit 6e8e183

Please sign in to comment.