Skip to content

Dependencies update#19

Merged
cfal merged 3 commits intocfal:masterfrom
18o:deps
Aug 28, 2024
Merged

Dependencies update#19
cfal merged 3 commits intocfal:masterfrom
18o:deps

Conversation

@18o
Copy link
Copy Markdown
Contributor

@18o 18o commented Aug 28, 2024

decrease warning according to cargo clippy . fixed dependencies version, prepare to upgrade them

Copy link
Copy Markdown
Owner

@cfal cfal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! thanks for taking the time.

} else {
debug!("{}:{} finished successfully", addr.ip(), addr.port());
}
// if let Err(e) =
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncomment? guessing you find these errors spammy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry you are right, these codes already uncomment now. seems some error before, then i comment them out. anyway it looks good now

Copy link
Copy Markdown
Owner

@cfal cfal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some last comments

#[inline]
pub fn allocate_vec<T>(len: usize) -> Vec<T> {
let mut ret = Vec::with_capacity(len);
let _remaining = ret.spare_capacity_mut();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?

let padding_len: usize = rng.gen_range(1..=900);

location_vec.reserve(padding_len + 2);
let _remaining = location_vec.spare_capacity_mut();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the recommend by cargo clippy, the details here: https://rust-lang.github.io/rust-clippy/master/index.html#/uninit_vec

@cfal
Copy link
Copy Markdown
Owner

cfal commented Aug 28, 2024

thanks!

@cfal cfal merged commit 0f44269 into cfal:master Aug 28, 2024
@18o 18o deleted the deps branch August 28, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants