Skip to content

Commit 57d4084

Browse files
committed
Update rustfmt.toml
1 parent 50f6ea3 commit 57d4084

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
reorder_imports = true
2+
imports_granularity = "Module"
23
max_width = 100

src/cursor.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
33
use crate::Model;
44
use core::pin::Pin;
5-
use futures_core::task;
6-
use futures_core::Stream;
5+
use futures_core::{task, Stream};
76
use mongodb::bson::{from_bson, Bson};
87

98
/// Streams the result of a query asynchronously for the given `Model`.

src/index.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
//! Indexes are used for efficient mongo queries.
22
33
use crate::CollectionConfig;
4-
use mongodb::bson::doc;
5-
use mongodb::bson::from_bson;
6-
use mongodb::bson::Bson;
7-
use mongodb::bson::Document;
4+
use mongodb::bson::{doc, from_bson, Bson, Document};
85
use mongodb::options::*;
96
use mongodb::Database;
107
use serde::Deserialize;

src/macros.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,3 @@ macro_rules! f {
207207
$crate::field!( @ @ ( $field in $type ) . $( $rest ).+ )
208208
}};
209209
}
210-

src/repository.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
//! Repositories are abstraction over a specific mongo collection for a given `Model`
22
33
use crate::{CollectionConfig, Model};
4-
use mongodb::bson::from_bson;
5-
use mongodb::bson::to_bson;
6-
use mongodb::bson::Bson;
7-
use mongodb::bson::Document;
4+
use mongodb::bson::{from_bson, to_bson, Bson, Document};
85
use mongodb::options::*;
96
use mongodb::results::*;
107

tests/indexes.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#[macro_use]
22
extern crate pretty_assertions;
33

4-
use mongodb::{bson::doc, options::ClientOptions, Client};
4+
use mongodb::bson::doc;
5+
use mongodb::options::ClientOptions;
6+
use mongodb::Client;
57
use mongodm::{sync_indexes, CollectionConfig, Index, IndexOption, Indexes};
68

79
struct OneSyncCollConf;

tests/some_operations.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
extern crate pretty_assertions;
33

44
use futures_util::StreamExt;
5-
use mongodb::{bson::doc, options::ClientOptions, Client};
5+
use mongodb::bson::doc;
6+
use mongodb::options::ClientOptions;
7+
use mongodb::Client;
68
use mongodm::operator::*;
79
use mongodm::{
810
f, sync_indexes, CollectionConfig, Index, IndexOption, Indexes, Model, ToRepository,

0 commit comments

Comments
 (0)