Skip to content

Commit

Permalink
fix: Use an array instead of a vec (#305)
Browse files Browse the repository at this point in the history
Arrays are faster than vectors and not heap-allocated.
  • Loading branch information
afnanenayet committed Mar 5, 2022
1 parent af01686 commit 07855f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn generate_ast_vector(data: &AstVectorData) -> AstVector<'_> {
///
/// This is used to determine whether the program should fall back to another diff utility.
fn are_input_files_supported(args: &Args, config: &Config) -> bool {
let paths = vec![&args.old, &args.new];
let paths = [&args.old, &args.new];

// If there's a user override at the command line, that takes priority over everything else.
if let Some(file_type) = &args.file_type {
Expand Down

0 comments on commit 07855f1

Please sign in to comment.