Skip to content

Commit

Permalink
style: fmt code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilerd committed Sep 10, 2024
1 parent 80bfce5 commit a46bd3c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion zhang-ast/src/utils/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl LotMeta {
}

/// Inventory likes a warehouse to record how many commodities are used, and how much are they.
///
///
/// And for investment tracing purpose, we need to record more details about how much we brought the commodity, and when.
/// That's why we need to use `lots` to record the info.
#[derive(Debug, Clone)]
Expand Down
3 changes: 2 additions & 1 deletion zhang-core/src/store/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::collections::{BTreeMap, HashMap, HashSet};

use crate::domains::schemas::{AccountDomain, CommodityDomain, ErrorDomain, MetaDomain, PriceDomain};
use bigdecimal::BigDecimal;
use chrono::{DateTime, NaiveDate};
use chrono_tz::Tz;
Expand All @@ -9,6 +8,8 @@ use uuid::Uuid;
use zhang_ast::amount::Amount;
use zhang_ast::{Account, Flag, SpanInfo};

use crate::domains::schemas::{AccountDomain, CommodityDomain, ErrorDomain, MetaDomain, PriceDomain};

#[derive(Default, serde::Serialize)]
pub struct Store {
pub options: HashMap<String, String>,
Expand Down
5 changes: 3 additions & 2 deletions zhang-server/src/request.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::cmp::max;
use std::collections::HashSet;

use bigdecimal::BigDecimal;
use chrono::{DateTime, Datelike, Local, Utc};
use serde::Deserialize;
use std::cmp::max;
use std::collections::HashSet;
use zhang_ast::Flag;

#[derive(Deserialize)]
Expand Down
9 changes: 4 additions & 5 deletions zhang-server/src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ pub mod plugin;
#[cfg(feature = "frontend")]
pub mod frontend;

use axum::{
async_trait,
extract::FromRequestParts,
http::{request::Parts, StatusCode},
};
use axum::async_trait;
use axum::extract::FromRequestParts;
use axum::http::request::Parts;
use axum::http::StatusCode;
use serde::de::DeserializeOwned;
use serde_qs;

Expand Down
3 changes: 1 addition & 2 deletions zhang-server/src/routes/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ use zhang_core::ledger::Ledger;
use zhang_core::store::TransactionDomain;
use zhang_core::utils::string_::{escape_with_quote, StringExt};

use super::Query;
use crate::request::{CreateTransactionRequest, JournalRequest};
use crate::response::{
InfoForNewTransaction, JournalBalanceCheckItemResponse, JournalBalancePadItemResponse, JournalItemResponse, JournalTransactionItemResponse,
JournalTransactionPostingResponse, Pageable, ResponseWrapper,
};
use crate::{ApiResult, ReloadSender};

use super::Query;

// todo rename api
pub async fn get_info_for_new_transactions(ledger: State<Arc<RwLock<Ledger>>>) -> ApiResult<InfoForNewTransaction> {
let guard = ledger.read().await;
Expand Down

0 comments on commit a46bd3c

Please sign in to comment.