Skip to content

Commit

Permalink
Reserve capacity ahead of time
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomShift committed Jul 4, 2024
1 parent 7ffc8fa commit bc0be57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ fn neko_to_kotatsu(input_path: String, output_path: PathBuf, verbose: bool, favo
})?;

let backup = nekotatsu::neko::Backup::decode(&mut neko_read.as_slice())?;
let mut result_categories = Vec::new();
let mut result_favourites = Vec::new();
let mut result_history = Vec::new();
let mut result_categories = Vec::with_capacity(backup.backup_categories.len() + 1);
let mut result_favourites = Vec::with_capacity(backup.backup_manga.len());
let mut result_history = Vec::with_capacity(backup.backup_manga.len());
let mut result_bookmarks = Vec::new();

let mut total_manga = 0;
Expand Down

0 comments on commit bc0be57

Please sign in to comment.