Skip to content

Commit

Permalink
feat(#124): clean for cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Aug 28, 2024
1 parent dd1c8a1 commit ee7acc1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions server/src/objects/fakehub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
use crate::objects::github::GitHub;
use crate::objects::inverse::inversed;
use crate::objects::inversed::inversed;
use std::collections::HashMap;
use uuid::Uuid;

Expand Down Expand Up @@ -54,7 +54,7 @@ impl Fakehub {
self.hubs
.iter()
.map(|(k, v)| GitHub {
id: k.clone(),
id: *k,
url: v.clone(),
})
.collect()
Expand Down Expand Up @@ -93,13 +93,13 @@ mod tests {
assert_that!(*id, is(equal_to(expected)));
Ok(())
}

#[test]
fn returns_all_github_instances_after_add() -> Result<()> {
let mut fakehub = Fakehub::default();
fakehub.add(GitHub {
id: Uuid::new_v4(),
url: String::from("https://test.github.com")
url: String::from("https://test.github.com"),
});
let instances = fakehub.githubs();
assert_that!(instances.len(), is(equal_to(2)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where

#[cfg(test)]
mod tests {
use crate::objects::inverse::inversed;
use crate::objects::inversed::inversed;
use anyhow::Result;
use hamcrest::{equal_to, is, HamcrestMatcher};
use std::collections::HashMap;
Expand Down
9 changes: 6 additions & 3 deletions server/src/objects/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
/// GitHub user.
pub mod user;
/// Fakehub.
pub mod fakehub;
/// GitHub.
pub mod github;
mod inverse;
/// Inverse.
pub mod inversed;
/// GitHub user.
pub mod user;

0 comments on commit ee7acc1

Please sign in to comment.