Skip to content

Commit

Permalink
Promote note about internal_span to doccomment
Browse files Browse the repository at this point in the history
Following #14700 we should make sure more folks are aware that you
shouldn't use `internal_span` outside of `Value` or core protocol/engine
internals.

By making it a doccomment maybe a few folks see the text in the lsp
hover etc.
  • Loading branch information
sholderbach committed Dec 30, 2024
1 parent 378395c commit 2a979ea
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions crates/nu-protocol/src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,120 +48,120 @@ use std::{
pub enum Value {
Bool {
val: bool,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Int {
val: i64,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Float {
val: f64,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
String {
val: String,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Glob {
val: String,
no_expand: bool,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Filesize {
val: Filesize,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Duration {
val: i64,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Date {
val: DateTime<FixedOffset>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Range {
val: Box<Range>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Record {
val: SharedCow<Record>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
List {
vals: Vec<Value>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Closure {
val: Box<Closure>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Error {
error: Box<ShellError>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Binary {
val: Vec<u8>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
CellPath {
val: CellPath,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Custom {
val: Box<dyn CustomValue>,
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Nothing {
// note: spans are being refactored out of Value
// please use .span() instead of matching this span value
/// note: spans are being refactored out of Value
/// please use .span() instead of matching this span value
#[serde(rename = "span")]
internal_span: Span,
},
Expand Down

0 comments on commit 2a979ea

Please sign in to comment.