Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
raduciobanu22 committed Jan 31, 2025
1 parent e286397 commit 44a528b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
7 changes: 1 addition & 6 deletions src/models.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
use bigdecimal::{
num_bigint::{BigInt, BigUint},
BigDecimal,
};
use bigdecimal::BigDecimal;
use chrono::NaiveDateTime;
use diesel::prelude::*;
use serde::{Deserialize, Serialize};

use crate::types::{Output, OutputRef, UnsignedTx};

#[derive(Queryable, Selectable, Insertable, Debug, Clone, Serialize, AsChangeset)]
#[diesel(table_name = crate::schema::blocks)]
#[diesel(check_for_backend(diesel::pg::Pg))]
Expand Down
3 changes: 1 addition & 2 deletions src/repository.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::{
db::DbPool,
models::{self, Block, Event, Transaction},
models::{Block, Event, Transaction},
};
use anyhow::Result;
use chrono::NaiveDateTime;
use diesel::prelude::*;

pub struct BlockRepository {
Expand Down
1 change: 0 additions & 1 deletion src/tests/client.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{
client::{Client, Network},
models::Block,
types::BlockHash,
};

Expand Down
7 changes: 1 addition & 6 deletions src/tests/crud.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
use std::env;

use crate::{
db::initialize_db_pool,
models,
schema::blocks,
types::{BlockEntry, BlockHash, FixedAssetOutput, Hash, Transaction, UnsignedTx},
};
use bigdecimal::{BigDecimal, FromPrimitive};
use chrono::TimeZone;
use chrono::{NaiveDate, NaiveDateTime};
use chrono::NaiveDate;
use diesel::prelude::*;
use diesel::{dsl::insert_into, RunQueryDsl};
use reqwest::Client;

fn mock_block() -> BlockEntry {
return BlockEntry {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
db::initialize_db_pool,
models,
repository::{BlockRepository, EventRepository, TransactionRepository},
types::{BlockEntry, BlockHash, FixedAssetOutput, Hash, Transaction, UnsignedTx},
types::{BlockEntry, BlockHash, Hash, Transaction, UnsignedTx},
};
use bigdecimal::{BigDecimal, FromPrimitive};
use chrono::NaiveDate;
Expand Down

0 comments on commit 44a528b

Please sign in to comment.