Skip to content

Commit

Permalink
remove duplicate prefix markers
Browse files Browse the repository at this point in the history
  • Loading branch information
douggynix committed Jul 6, 2024
1 parent d849519 commit e541c32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ pub trait CollectionConfig {
/// Configure how indexes should be created and synchronized for the associated collection.
///
/// This method has a default implementation returning no index (only special `_id` index will be present).
fn indexes() -> index::Indexes {
index::Indexes::default()
fn indexes() -> Indexes {
Indexes::default()
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ pub struct Repository<M: Model + Send + Sync> {
coll: mongodb::Collection<M>,
}

impl<M: Model + std::marker::Send + std::marker::Sync> Deref for Repository<M> {
impl<M: Model + Send + Sync> Deref for Repository<M> {
type Target = mongodb::Collection<M>;
fn deref(&self) -> &mongodb::Collection<M> {
&self.coll
}
}

impl<M: Model + std::marker::Send + std::marker::Sync + std::marker::Sync + std::marker::Sync> Clone
impl<M: Model + Send + Sync> Clone
for Repository<M>
{
fn clone(&self) -> Self {
Expand Down Expand Up @@ -223,9 +223,8 @@ impl<M: Model + Send + Sync> Repository<M> {
pub fn cast_model<OtherModel>(self) -> Repository<OtherModel>
where
OtherModel: Model<CollConf = M::CollConf>
+ std::marker::Send
+ std::marker::Sync
+ std::marker::Sync,
+ Send
+ Sync
{
Repository {
db: self.db,
Expand Down

0 comments on commit e541c32

Please sign in to comment.