Extract PartialComponents into a type alias (#2767)

Pulling PartialComponents into a named `Service` type stops clippy
complaining about type complexity and also makes the type signatures a
little less scary to read.

There's two instances where we can't pull it out into a type because a
nightly feature has not yet been stabilised (E.g. the `imp Fn` isn't
stabilised in a type alias context here:
https://github.com/paritytech/polkadot-sdk/blob/d84e135bbfc366a17bb6b72d0fc9d09ee781ab8d/polkadot/node/service/src/lib.rs#L477
).

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Squirrel
2024-01-01 22:46:44 +00:00
committed by GitHub
parent 9a27b53e8e
commit 1dd1a16066
6 changed files with 75 additions and 71 deletions
+17
View File
@@ -0,0 +1,17 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
title: Extract PartialComponents into type alias `Service`
doc:
- audience: Node Dev
description: |
Simplifies service definitions by extraction of a complicated type into a type alias. No breaking changes.
crates:
- name: "sc-service"
- name: "node-template"
- name: "minimal-node"
- name: "cumulus-test-service"
- name: "polkadot-parachain-bin"
- name: "parachain-template-node"