mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:25:15 +02:00
Follow API guidelines for public types (#12283)
# Description Follow the [API guideline naming conventions](https://rust-lang.github.io/api-guidelines/naming.html) also for our externally exposed types (See [`clippy::wrong_self_convention`](https://rust-lang.github.io/rust-clippy/master/index.html#/wrong_self_convention) with [`avoid-breaking-exported-api = false`](https://doc.rust-lang.org/clippy/lint_configuration.html#avoid-breaking-exported-api) ) Also be a good citizen around doccomments - **Fix `Unit::to_value` to `Unit::build_value`** - **Fix `PipelineData::is_external_failed` to `check_external_failed`** - **Fix doccomment on `check_external_failed`** - **Fix `Value::into_config` naming to `parse_as_config`** - **Document `Value::parse_as_config`** # Plugin-Author-Facing Changes See renames above
This commit is contained in:
committed by
GitHub
parent
e8bcfbaed1
commit
24d2c8dd8e
@ -353,7 +353,7 @@ pub fn find_in_dirs_env(
|
||||
/// is the canonical way to fetch config at runtime when you have Stack available.
|
||||
pub fn get_config(engine_state: &EngineState, stack: &Stack) -> Config {
|
||||
if let Some(mut config_record) = stack.get_env_var(engine_state, "config") {
|
||||
config_record.into_config(engine_state.get_config()).0
|
||||
config_record.parse_as_config(engine_state.get_config()).0
|
||||
} else {
|
||||
engine_state.get_config().clone()
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ pub fn eval_expression_with_input<D: DebugContext>(
|
||||
|
||||
// Try to catch and detect if external command runs to failed.
|
||||
fn might_consume_external_result(input: PipelineData) -> (PipelineData, bool) {
|
||||
input.is_external_failed()
|
||||
input.check_external_failed()
|
||||
}
|
||||
|
||||
fn eval_redirection<D: DebugContext>(
|
||||
|
Reference in New Issue
Block a user