Skip to content

Follow API guidelines for public types - #12283

Merged
sholderbach merged 5 commits into
nushell:mainfrom
sholderbach:api-guidelines-fix
Mar 26, 2024
Merged

sholderbach merged 5 commits into
nushell:mainfrom
sholderbach:api-guidelines-fix

Conversation

@sholderbach

Copy link
Copy Markdown
Member

Description

Follow the API guideline naming conventions also for our externally exposed types

(See clippy::wrong_self_convention with avoid-breaking-exported-api = false )

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

Follow the Rust API guidelines on naming of conversions. As a unit-less
value (`i64`) and `Span` are added to create the `Value` call it
`build_value`

Also take `Unit` by-val as it implements `Copy` (calling convention will
probably limit any benefit of taking a u8 (current repr for the enum)
instead of a usize)
Also annotate the completing property of the current impl

cc @WindSoilder
@sholderbach sholderbach added the api-change This PR should be mentioned in #api-updates channel on Discord label Mar 26, 2024
@sholderbach
sholderbach merged commit 24d2c8d into nushell:main Mar 26, 2024
@sholderbach
sholderbach deleted the api-guidelines-fix branch March 26, 2024 11:12
@hustcer hustcer added this to the v0.92.0 milestone Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change This PR should be mentioned in #api-updates channel on Discord

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants