Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy / fix juniper_support misspell #85

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading