mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Rename Value::CustomValue
to Value::Custom
(#12309)
# Description The second `Value` is redundant and will consume five extra bytes on each transmission of a custom value to/from a plugin. # User-Facing Changes This is a breaking change to the plugin protocol. The [example in the protocol reference](https://www.nushell.sh/contributor-book/plugin_protocol_reference.html#value) becomes ```json { "Custom": { "val": { "type": "PluginCustomValue", "name": "database", "data": [36, 190, 127, 40, 12, 3, 46, 83], "notify_on_drop": true }, "span": { "start": 320, "end": 340 } } } ``` instead of ```json { "CustomValue": { ... } } ``` # After Submitting Update plugin protocol reference
This commit is contained in:
committed by
GitHub
parent
dfbbacfdf8
commit
b19da158d5
@ -58,7 +58,7 @@ impl Command for StorCreate {
|
||||
|
||||
process(table_name, span, &db, columns)?;
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ impl Command for StorDelete {
|
||||
}
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ impl Command for StorExport {
|
||||
})?;
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ impl Command for StorImport {
|
||||
})?;
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ impl Command for StorInsert {
|
||||
};
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ impl Command for StorReset {
|
||||
})?;
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ impl Command for StorUpdate {
|
||||
};
|
||||
}
|
||||
// dbg!(db.clone());
|
||||
Ok(Value::custom_value(db, span).into_pipeline_data())
|
||||
Ok(Value::custom(db, span).into_pipeline_data())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user