diff --git a/identified_vec/src/is_identifiable_vec.rs b/identified_vec/src/is_identifiable_vec.rs index 9d31d2c..4ab6957 100644 --- a/identified_vec/src/is_identifiable_vec.rs +++ b/identified_vec/src/is_identifiable_vec.rs @@ -55,7 +55,7 @@ where /// /// ``` /// extern crate identified_vec; - /// use identified_vec::{IsIdentifiableVec, IdentifiedVec, Identifiable, IdentifiedVecOf}; + /// use identified_vec::{IsIdentifiableVec, IsIdentifiableVecOf, IdentifiedVec, Identifiable, IdentifiedVecOf}; /// /// #[derive(Eq, PartialEq, Clone, Debug, Hash)] /// struct User { @@ -174,7 +174,7 @@ where /// /// ``` /// extern crate identified_vec; - /// use identified_vec::{IsIdentifiableVec, IdentifiedVec, Identifiable, IdentifiedVecOf}; + /// use identified_vec::{IsIdentifiableVec, IsIdentifiableVecOf, IdentifiedVec, Identifiable, IdentifiedVecOf}; /// /// #[derive(Eq, PartialEq, Clone, Debug, Hash)] /// struct User { diff --git a/identified_vec/src/is_identified_vec_via.rs b/identified_vec/src/is_identified_vec_via.rs index 81f50b1..1e4238d 100644 --- a/identified_vec/src/is_identified_vec_via.rs +++ b/identified_vec/src/is_identified_vec_via.rs @@ -1,7 +1,3 @@ -use std::borrow::BorrowMut; -use std::cell::RefMut; -use std::ops::Deref; - use crate::conflict_resolution_choice::ConflictResolutionChoice; use crate::{Identifiable, IdentifiedVecOf, IsIdentifiableVec, IsIdentifiableVecOf}; diff --git a/identified_vec/src/lib.rs b/identified_vec/src/lib.rs index b53a130..04b1485 100644 --- a/identified_vec/src/lib.rs +++ b/identified_vec/src/lib.rs @@ -10,7 +10,7 @@ //! //! ``` //! extern crate identified_vec; -//! use identified_vec::{IsIdentifiableVec, IdentifiedVec, IdentifiedVecOf, Identifiable}; +//! use identified_vec::{IsIdentifiableVec, IsIdentifiableVecOf, IdentifiedVec, IdentifiedVecOf, Identifiable}; //! use std::cell::RefCell; //! //! #[derive(Eq, PartialEq, Clone, Debug)] diff --git a/identified_vec/src/vec.rs b/identified_vec/src/vec.rs index e171c2f..a730536 100644 --- a/identified_vec/src/vec.rs +++ b/identified_vec/src/vec.rs @@ -23,7 +23,7 @@ use crate::is_identifiable_vec::IsIdentifiableVec; /// /// ``` /// extern crate identified_vec; -/// use identified_vec::{IdentifiedVec, Identifiable, IdentifiedVecOf, IsIdentifiableVec}; +/// use identified_vec::{IdentifiedVec, Identifiable, IdentifiedVecOf, IsIdentifiableVec, IsIdentifiableVecOf}; /// use std::cell::RefCell; /// /// #[derive(Eq, PartialEq, Clone, Debug)] @@ -121,7 +121,7 @@ use crate::is_identifiable_vec::IsIdentifiableVec; /// /// ``` /// /// extern crate identified_vec; -/// use identified_vec::{IdentifiedVec, Identifiable, IdentifiedVecOf, IsIdentifiableVec}; +/// use identified_vec::{IdentifiedVec, Identifiable, IdentifiedVecOf, IsIdentifiableVec, IsIdentifiableVecOf}; /// /// let numbers = IdentifiedVec::::new_identifying_element(|e| *e); /// ``` @@ -325,7 +325,7 @@ where /// /// ``` /// extern crate identified_vec; - /// use identified_vec::{IsIdentifiableVec, IdentifiedVec, Identifiable, IdentifiedVecOf}; + /// use identified_vec::{IsIdentifiableVec, IsIdentifiableVecOf, IdentifiedVec, Identifiable, IdentifiedVecOf}; /// /// #[derive(Eq, PartialEq, Clone, Debug, Hash)] /// struct User { @@ -512,7 +512,7 @@ where /// /// ``` /// extern crate identified_vec; - /// use identified_vec::{IsIdentifiableVec, IdentifiedVec, Identifiable, IdentifiedVecOf}; + /// use identified_vec::{IsIdentifiableVec, IsIdentifiableVecOf, IdentifiedVec, Identifiable, IdentifiedVecOf}; /// /// #[derive(Eq, PartialEq, Clone, Debug, Hash)] /// struct User { diff --git a/tests/tests.rs b/tests/tests.rs index 1b11a15..f88302a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,9 +1,4 @@ -use std::{ - cell::{Ref, RefCell, RefMut}, - collections::HashSet, - fmt::Debug, - ops::Deref, -}; +use std::{cell::RefCell, collections::HashSet, fmt::Debug, ops::Deref}; use identified_vec::{ ConflictResolutionChoice, Identifiable, IdentifiedVec, IdentifiedVecOf, @@ -127,6 +122,7 @@ fn get() { // identified_vec.get(id), // Some(&User::new(id.clone(), "Blob, Esq.")) // ); + // identified_vec.upd // // 2 // id = &2; @@ -148,19 +144,19 @@ fn get() { // .drain(4..9); // assert_eq!(identified_vec.get(id), Some(&User::new(id.clone(), "Blob"))); - identified_vec.remove_by_id(id); - assert_eq!(identified_vec.get(id), None); - identified_vec.append(User::new(4, "Blob, Sr.")); - assert_eq!( - identified_vec.elements(), - [ - User::new(1, "Blob, Esq."), - User::new(2, "Blob"), - User::new(4, "Blob, Sr."), - ] - .iter() - .collect::>() - ); + // identified_vec.remove_by_id(id); + // assert_eq!(identified_vec.get(id), None); + // identified_vec.append(User::new(4, "Blob, Sr.")); + // assert_eq!( + // identified_vec.elements(), + // [ + // User::new(1, "Blob, Esq."), + // User::new(2, "Blob"), + // User::new(4, "Blob, Sr."), + // ] + // .iter() + // .collect::>() + // ); } #[test] @@ -592,10 +588,3 @@ fn test_macro() { sut.update_or_append(User::blob_jr()); assert_eq!(sut.items(), [User::blob_sr(), User::blob_jr()]); } - -// #[test] -// fn test_macro() { -// let mut users = CollectionOfUsers::new(); -// users.0.append(User::blob()); -// assert_eq!(users.0.items(), [User::blob()]) -// }