Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Jun 21, 2022
1 parent 091a91f commit fff738a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
6 changes: 1 addition & 5 deletions tests/common/features/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,7 @@ pub async fn create_json_vec_table(db: &DbConn) -> Result<ExecResult, DbErr> {
.auto_increment()
.primary_key(),
)
.col(
ColumnDef::new(json_vec::Column::StrVec)
.string()
.not_null(),
)
.col(ColumnDef::new(json_vec::Column::StrVec).string().not_null())
.to_owned();

create_table(db, &create_table_stmt, JsonVec).await
Expand Down
11 changes: 2 additions & 9 deletions tests/json_vec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ async fn main() -> Result<(), DbErr> {
pub async fn insert_json_vec(db: &DatabaseConnection) -> Result<(), DbErr> {
let json_vec = json_vec::Model {
id: 1,
str_vec: json_vec::StringVec(vec![
"1".to_string(),
"2".to_string(),
"3".to_string(),
])
str_vec: json_vec::StringVec(vec!["1".to_string(), "2".to_string(), "3".to_string()]),
};

let result = json_vec.clone().into_active_model().insert(db).await?;
Expand All @@ -38,10 +34,7 @@ pub async fn insert_json_vec(db: &DatabaseConnection) -> Result<(), DbErr> {
.one(db)
.await?;

assert_eq!(
model,
Some(json_vec)
);
assert_eq!(model, Some(json_vec));

Ok(())
}

0 comments on commit fff738a

Please sign in to comment.