CI: Fail the lint job when cargo-clippy reports some warnings (#33941)

* Fail the lint job when cargo-clippy reports some warnings

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Remove todo comment

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* clippy: use Option::take instead of mem::replace

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
tanishka 2024-10-21 20:48:32 +05:30 committed by GitHub
parent dc03d1f3e2
commit 571cba4a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -51,9 +51,8 @@ jobs:
sudo apt update
python3 ./mach bootstrap
# TODO: Do GitHub anotaions
# TODO: Fail on warnings
- name: Clippy
run: |
python3 ./mach cargo-clippy --use-crown --locked
python3 ./mach cargo-clippy --use-crown --locked -- -- --deny warnings
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all

View file

@ -867,7 +867,7 @@ impl<'a> AbsoluteAxisSolver<'a> {
// Override sizes
let old_size = mem::replace(&mut self.computed_size, AuOrAuto::LengthPercentage(size));
let old_min_size = mem::replace(&mut self.computed_min_size, Au::zero());
let old_max_size = mem::replace(&mut self.computed_max_size, None);
let old_max_size = self.computed_max_size.take();
let result = self.solve_tentatively();