mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: correct Vec capacity allocation caused by variable name shadowing (#2139)
This commit is contained in:
parent
ef599a160a
commit
40fea8521e
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ impl Files {
|
||||||
let (first, rest) = entries.split_at(entries.len() / 3);
|
let (first, rest) = entries.split_at(entries.len() / 3);
|
||||||
let (second, third) = rest.split_at(entries.len() / 3);
|
let (second, third) = rest.split_at(entries.len() / 3);
|
||||||
async fn go(entries: &[DirEntry]) -> Vec<File> {
|
async fn go(entries: &[DirEntry]) -> Vec<File> {
|
||||||
let mut files = Vec::with_capacity(entries.len() / 3 + 1);
|
let mut files = Vec::with_capacity(entries.len());
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
let url = Url::from(entry.path());
|
let url = Url::from(entry.path());
|
||||||
files.push(match entry.metadata().await {
|
files.push(match entry.metadata().await {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue