Skip to content

Commit 6840509

Browse files
fix(smith): apply new clippy rules from Rust 1.90 (#1001)
1 parent 44466c4 commit 6840509

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/apollo-smith/src/schema.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,18 @@ impl DocumentBuilder<'_> {
140140

141141
let arbitrary_idx: usize = self.u.arbitrary::<usize>()?;
142142

143-
let mut query = (arbitrary_idx % 2 == 0)
143+
let mut query = arbitrary_idx
144+
.is_multiple_of(2)
144145
.then(|| self.u.choose(&named_types))
145146
.transpose()?
146147
.cloned();
147-
let mut mutation = (arbitrary_idx % 3 == 0)
148+
let mut mutation = arbitrary_idx
149+
.is_multiple_of(3)
148150
.then(|| self.u.choose(&named_types))
149151
.transpose()?
150152
.cloned();
151-
let mut subscription = (arbitrary_idx % 5 == 0)
153+
let mut subscription = arbitrary_idx
154+
.is_multiple_of(5)
152155
.then(|| self.u.choose(&named_types))
153156
.transpose()?
154157
.cloned();

0 commit comments

Comments
 (0)