Repository navigation
Fix clippy lints that will become warnings - #435
Merged
Merged
Conversation
clippy from the nightly future
sholderbach
marked this pull request as draft
May 30, 2022 16:38
Member
Author
|
This lint/change is nasty as Applying the suggested fix will remove syntax highlighting!!! |
This [lint](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned) is nasty as `ansi_term` and thus `nu_ansi_term` on their `AnsiGenericString` implement `Display` to apply the styling and `Deref` to just return the underlying `&str`. As [`ToString` is implemented for any `T: Display + ?Sized` ](https://doc.rust-lang.org/std/string/trait.ToString.html#impl-ToString-6) the to_string implementation relies on the `Display` defined for the type alias `AnsiString` and not on the `impl ToString for str` for the `&str` accessible through `Deref`. Applying the suggested fix will remove syntax highlighting!!!
sholderbach
marked this pull request as ready for review
June 3, 2022 08:47
3 tasks done
sholderbach
added a commit
to nushell/nushell
that referenced
this pull request
Jun 3, 2022
Resolves an unexpected issue due to `Deref` and `ToString` interacting Details: nushell/nu-ansi-term#5 and nushell/reedline#435 (comment) Also updates reedline: Includes a fix for a panic when the directory containing the history is deleted during a running reedline session. (nushell/reedline#436)
fennewald
pushed a commit
to fennewald/nushell
that referenced
this pull request
Jun 27, 2022
Resolves an unexpected issue due to `Deref` and `ToString` interacting Details: nushell/nu-ansi-term#5 and nushell/reedline#435 (comment) Also updates reedline: Includes a fix for a panic when the directory containing the history is deleted during a running reedline session. (nushell/reedline#436)
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


clippy from the nightly future