refactor: use copy_limit if greater than 0

This commit is contained in:
Namekuji 2023-07-13 18:19:08 -04:00
parent 5291fd4f10
commit 3fc381c050
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -36,10 +36,10 @@ impl MigrationTrait for Migration {
.await?
.unwrap()
.try_get_by_index::<i64>(0)?;
let copy_limit = if copy_limit == 0 {
total_num
} else {
let copy_limit = if copy_limit > 0 {
copy_limit
} else {
total_num
};
println!(
"Copying {} out of {} entries in antenna_note.",