Stefan Holderbach
ecb9799b6a
Fix future clippy lints ( #15519 )
...
- suggestions for tersity using helpers
2025-04-08 08:51:12 +08:00
zc he
339c5b7c83
fix: clippy warning of rust 1.8.4 ( #14984 )
...
# Description
I'm on rust toolchain 1.8.4, and I can see clippy warnings that can't be
caught by the ci workflow, primarily related to lifetime params.
I think it doesn't hurt to fix those in advance.
# User-Facing Changes
# Tests + Formatting
# After Submitting
2025-02-02 07:56:54 -06:00
Stefan Holderbach
b88d8726d0
Rework for new clippy lints ( #12736 )
...
- **Clippy lint `assigning_clones`**
- **Clippy lint `legacy_numeric_constants`**
- **`clippy::float_equality_without_abs`**
- **`nu-table`: clippy::zero_repeat_side_effects**
---------
Co-authored-by: Ian Manske <ian.manske@pm.me>
2024-05-02 19:29:03 +02:00
Stefan Holderbach
e889679d42
Use nightly clippy to kill dead code/fix style ( #12334 )
...
- **Remove duplicated imports**
- **Remove unused field in `CompletionOptions`**
- **Remove unused struct in `nu-table`**
- **Clarify generic bounds**
- **Simplify a subtrait bound for `ExactSizeIterator`**
- **Use `unwrap_or_default`**
- **Use `Option` directly instead of empty string**
- **Elide unneeded clone in `to html`**
2024-03-30 09:17:28 +08:00
Stefan Holderbach
e90b099622
Use slices directly instead of &Vec
( #10328 )
...
Simplifies the signature, makes it more flexible.
Detected a few unnecessary allocations in the process.
2023-09-12 11:38:20 +08:00
Stefan Holderbach
e5d38dcff6
Address lints from clippy for beta/nightly ( #5709 )
...
* Fix clippy lints in tests
* Replace `format!` in `.push_str()` with `write!`
Stylistically that might be a bit rough but elides an allocation.
Fallibility of allocation is more explicit, but ignored with `let _ =`
like in the clippy example:
https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
* Remove unused lifetime
* Fix macro crate relative import
* Derive `Eq` for `PartialEq` with `Eq` members
https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
* Remove unnnecessary `.to_string()` for Cow<str>
* Remove `.to_string()` for `tendril::Tendril`
Implements `Deref<Target = str>`
2022-06-04 18:47:36 +12:00
Marcin Puc
51c74eebd0
Add general refactorings ( #3996 )
2021-09-10 10:44:22 +12:00
JT
91a929b2a9
Clippy fixes for new Rust version ( #3392 )
2021-05-07 07:58:21 +12:00
Jonathan Turner
7e184b58b2
Fix warnings for Rust 1.51 ( #3214 )
...
* Fix warnings for Rust 1.51
* More fixes
* More fixes
2021-03-26 21:26:57 +13:00
Andrés N. Robalino
0b71e45072
Preserve order when serializing/deserialize json by default. ( #3126 )
2021-03-04 01:35:13 -05:00
Jonathan Turner
5481db4079
Fix latest clippy warnings ( #3049 )
2021-02-12 23:13:14 +13:00
Joseph T. Lyons
15d49e4096
Rust 1.49 Clippy Fixes ( #2835 )
2021-01-01 15:13:59 +13:00
Jonathan Turner
930f9f0063
Fix new clippy warnings ( #2760 )
...
* Fix new clippy warnings
* Fork serde-hjson and bring in
* Fork serde-hjson and bring in
* Fix clippy lint again
2020-11-22 13:37:16 +13:00