From cf36c8205bdc233ac923de80daf35ac5aa51146c Mon Sep 17 00:00:00 2001 From: Neshura Date: Thu, 7 Sep 2023 20:33:47 +0200 Subject: [PATCH] Rust Version, Linting & CI Fix --- .gitlab-ci.yml | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- src/db/mod.rs | 4 ---- src/main.rs | 4 ++-- src/v3/mod.rs | 4 ++-- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7621e9e..b92dca6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build: after_script: - echo JOB_ID=$CI_JOB_ID >> job.env - mkdir ./artifacts - - cp /builds/Neshura/chellaris-rust-api/target/release/chellaris-rust-api ./artifacts/ + - cp /builds/neshura-websites/chellaris-rust-api/target/release/chellaris-rust-api ./artifacts/ artifacts: paths: - ./artifacts/ diff --git a/Cargo.lock b/Cargo.lock index 93c78fa..6870a7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -398,7 +398,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chellaris-rust-api" -version = "0.1.0" +version = "1.0.3" dependencies = [ "actix-web", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 4d071ee..f0b7398 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chellaris-rust-api" -version = "0.1.0" +version = "1.0.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/db/mod.rs b/src/db/mod.rs index 7c8e632..0f2302c 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -1,5 +1 @@ -use std::error::Error; - -use sqlx::{Postgres, postgres::PgConnectOptions, PgPool, Pool}; - pub(crate) mod schemas; \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index d8da6f8..8cc7c09 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ extern crate dotenv; use dotenv::dotenv; use tokio::time::sleep; -use std::{env, error::Error, fs, net::Ipv4Addr, net::Ipv6Addr, thread, time::Duration, sync::{Mutex, Arc, atomic::{AtomicBool, Ordering}}}; +use std::{env, fs, net::Ipv4Addr, net::Ipv6Addr, time::Duration, sync::{Arc, atomic::{AtomicBool, Ordering}}}; use chrono::Local; @@ -266,7 +266,7 @@ async fn main() -> Result<()> { while is_alive.load(Ordering::Relaxed) { let thread = tokio::spawn(async { - sleep(Duration::from_millis(100)); + let _ = sleep(Duration::from_millis(100)); }); let _ = thread.await; diff --git a/src/v3/mod.rs b/src/v3/mod.rs index 980e772..7769a5b 100644 --- a/src/v3/mod.rs +++ b/src/v3/mod.rs @@ -5,10 +5,10 @@ use actix_web::{ web::{self, Json}, HttpRequest, HttpResponse, Responder, }; -use sqlx::{Execute, QueryBuilder}; +use sqlx::{QueryBuilder}; use crate::{ - db::{self, schemas::EmpireEthic}, + db::{self}, AppState, };