Skip to content

Commit

Permalink
Make sure itertools is only imported when used
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Nov 22, 2023
1 parent 35c7877 commit 9a40a29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/sdk-schemas/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{fs::File, io::Write};

use anyhow::Result;
use itertools::Itertools;
use schemars::{schema::RootSchema, schema_for, JsonSchema};

/// Creates a json schema file for any type passed in using Schemars. The filename and path of the generated
Expand Down Expand Up @@ -45,6 +44,8 @@ use schemars::{schema::RootSchema, schema_for, JsonSchema};
/// will generate `Response.json` at `{{pwd}}/path/to/folder/Response.json`
macro_rules! write_schema_for {
($type:ty) => {
use itertools::Itertools;

let schema = schema_for!($type);

let type_name = stringify!($type);
Expand Down

0 comments on commit 9a40a29

Please sign in to comment.