mirror of
https://github.com/nushell/nushell.git
synced 2025-08-20 11:32:27 +02:00
Clippy fixes from stable and nightly (#13455)
- **Doccomment style fixes** - **Forgotten stuff in `nu-pretty-hex`** - **Don't `for` around an `Option`** - and more I think the suggestions here are a net positive, some of the suggestions moved into #13498 feel somewhat arbitrary, I also raised https://github.com/rust-lang/rust-clippy/issues/13188 as the nightly `byte_char_slices` would require either a global allow or otherwise a ton of granular allows or possibly confusing bytestring literals.
This commit is contained in:
committed by
GitHub
parent
928c57db41
commit
42531e017c
@@ -19,12 +19,12 @@ const LINE_ENDING_PATTERN: &[char] = &['\r', '\n'];
|
||||
/// We've tried a few variations of this structure. Listing these below so we have a record.
|
||||
///
|
||||
/// * We tried always assuming a stream in Nushell. This was a great 80% solution, but it had some rough edges.
|
||||
/// Namely, how do you know the difference between a single string and a list of one string. How do you know
|
||||
/// when to flatten the data given to you from a data source into the stream or to keep it as an unflattened
|
||||
/// list?
|
||||
/// Namely, how do you know the difference between a single string and a list of one string. How do you know
|
||||
/// when to flatten the data given to you from a data source into the stream or to keep it as an unflattened
|
||||
/// list?
|
||||
///
|
||||
/// * We tried putting the stream into Value. This had some interesting properties as now commands "just worked
|
||||
/// on values", but lead to a few unfortunate issues.
|
||||
/// on values", but lead to a few unfortunate issues.
|
||||
///
|
||||
/// The first is that you can't easily clone Values in a way that felt largely immutable. For example, if
|
||||
/// you cloned a Value which contained a stream, and in one variable drained some part of it, then the second
|
||||
@@ -37,8 +37,8 @@ const LINE_ENDING_PATTERN: &[char] = &['\r', '\n'];
|
||||
/// concrete list values rather than streams, and be able to view them without non-local effects.
|
||||
///
|
||||
/// * A balance of the two approaches is what we've landed on: Values are thread-safe to pass, and we can stream
|
||||
/// them into any sources. Streams are still available to model the infinite streams approach of original
|
||||
/// Nushell.
|
||||
/// them into any sources. Streams are still available to model the infinite streams approach of original
|
||||
/// Nushell.
|
||||
#[derive(Debug)]
|
||||
pub enum PipelineData {
|
||||
Empty,
|
||||
|
Reference in New Issue
Block a user