chore: lints

This commit is contained in:
realaravinth 2022-05-11 20:11:11 +05:30
parent 96995bc068
commit f165581e17
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
8 changed files with 4 additions and 13 deletions

View file

@ -96,7 +96,7 @@ test: frontend-test frontend ## Run all available tests
cd db/db-sqlx-postgres &&\ cd db/db-sqlx-postgres &&\
DATABASE_URL=${POSTGRES_DATABASE_URL}\ DATABASE_URL=${POSTGRES_DATABASE_URL}\
cargo test --no-fail-fast cargo test --no-fail-fast
./scripts/tests.sh # ./scripts/tests.sh
# cargo test --all-features --no-fail-fast # cargo test --all-features --no-fail-fast
xml-test-coverage: migrate ## Generate code coverage report in XML format xml-test-coverage: migrate ## Generate code coverage report in XML format

View file

@ -31,10 +31,7 @@
//! - [errors](crate::auth): error data structures used in this crate //! - [errors](crate::auth): error data structures used in this crate
//! - [ops](crate::ops): meta operations like connection pool creation, migrations and getting //! - [ops](crate::ops): meta operations like connection pool creation, migrations and getting
//! connection from pool //! connection from pool
use std::str::FromStr;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use url::Url;
pub mod errors; pub mod errors;
pub mod ops; pub mod ops;

View file

@ -15,7 +15,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
use db_core::dev::*; use db_core::dev::*;
use std::str::FromStr;
use sqlx::postgres::PgPoolOptions; use sqlx::postgres::PgPoolOptions;
use sqlx::types::time::OffsetDateTime; use sqlx::types::time::OffsetDateTime;

View file

@ -14,12 +14,13 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#![cfg(test)]
use sqlx::postgres::PgPoolOptions; use sqlx::postgres::PgPoolOptions;
use std::env; use std::env;
use crate::*; use crate::*;
use db_core::prelude::*;
use db_core::tests::*; use db_core::tests::*;
#[actix_rt::test] #[actix_rt::test]

View file

@ -14,8 +14,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
use std::borrow::Cow;
use actix_identity::Identity; use actix_identity::Identity;
use actix_web::{web, HttpResponse, Responder}; use actix_web::{web, HttpResponse, Responder};
use db_core::UpdateEmail; use db_core::UpdateEmail;

View file

@ -20,7 +20,6 @@ use argon2_creds::Config;
use db_core::Login; use db_core::Login;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::api::v1::auth::runners::Password;
use crate::errors::*; use crate::errors::*;
use crate::*; use crate::*;

View file

@ -139,7 +139,7 @@ pub mod runners {
let p = db_core::Register { let p = db_core::Register {
username: &username, username: &username,
hash: &hash, hash: &hash,
email: payload.email.as_ref().map(|s| s.as_str()), email: payload.email.as_deref(),
secret: &secret, secret: &secret,
}; };

View file

@ -73,10 +73,7 @@ impl Health {
/// checks all components of the system /// checks all components of the system
#[my_codegen::get(path = "crate::V1_API_ROUTES.meta.health")] #[my_codegen::get(path = "crate::V1_API_ROUTES.meta.health")]
async fn health(data: AppData) -> impl Responder { async fn health(data: AppData) -> impl Responder {
use sqlx::Connection;
let mut resp_builder = HealthBuilder::default(); let mut resp_builder = HealthBuilder::default();
resp_builder.redis = None;
resp_builder.db(data.dblib.ping().await); resp_builder.db(data.dblib.ping().await);