Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Dec 27, 2023
1 parent 5c757d0 commit 9d78b1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

init-kafka-topics:
docker exec -it pragma-kafka "kafka-topics" "--bootstrap-server" "localhost:9092" "--topic" "pragma-data" "--create" "--partitions" "1" "--replication-factor" "1" || true
docker exec -it pragma-kafka "kafka-topics" "--bootstrap-server" "localhost:9092" "--topic" "__consumer_offsets" "--create" "--partitions" "1" "--replication-factor" "1" || true
docker exec -it pragma-kafka "kafka-topics" "--bootstrap-server" "localhost:9092" "--topic" "__consumer_offsets" "--create" "--partitions" "1" "--replication-factor" "1" || true
format:
cargo fmt -- --check
cargo clippy --no-deps -- -D warnings
cargo clippy --tests --no-deps -- -D warnings
4 changes: 2 additions & 2 deletions pragma-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ pub static CONFIG: OnceCell<Config> = OnceCell::const_new();
async fn init_config() -> Config {
dotenv().ok();

let server_config = envy::from_env::<ServerConfig>().unwrap_or(ServerConfig::default());
let server_config = envy::from_env::<ServerConfig>().unwrap_or_default();

let kafka_config = envy::from_env::<KafkaConfig>().unwrap_or(KafkaConfig::default());
let kafka_config = envy::from_env::<KafkaConfig>().unwrap_or_default();

Config {
server: server_config,
Expand Down
3 changes: 1 addition & 2 deletions pragma-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ async fn main() {
paths(
handlers::entries::create_entry::create_entries,
handlers::entries::get_entry::get_entry,
handlers::entries::convert_amount::convert_amount,
handlers::entries::get_volatility::get_volatility,
),
components(
schemas(pragma_entities::dto::Entry, pragma_entities::EntryError),
schemas(pragma_entities::dto::Publisher, pragma_entities::PublisherError),
schemas(handlers::entries::CreateEntryRequest, handlers::entries::CreateEntryResponse, handlers::entries::GetEntryResponse, handlers::entries::ConvertAmountResponse, handlers::entries::GetVolatilityResponse),
schemas(handlers::entries::CreateEntryRequest, handlers::entries::CreateEntryResponse, handlers::entries::GetEntryResponse, handlers::entries::GetVolatilityResponse),
schemas(handlers::entries::Entry, handlers::entries::BaseEntry),
schemas(infra::errors::InfraError),
),
Expand Down

0 comments on commit 9d78b1d

Please sign in to comment.