We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustfmt.toml
We can add a rustfmt.toml file to the repo and use some of the nightly features like
reorder_imports = true imports_granularity = "Crate" format_code_in_doc_comments = true
Read more about these configs in here.
Highly improved code formatting and readability. Formatting imports. Formatting the code in doc as well. Example: reth - rustfmt.toml
This:
pub use self::behaviour::{Behaviour, Event, MessageAuthenticity}; pub use self::config::{Config, ConfigBuilder, ValidationMode, Version}; pub use self::error::{ConfigBuilderError, PublishError, SubscriptionError, ValidationError}; pub use self::metrics::Config as MetricsConfig; pub use self::peer_score::{ score_parameter_decay, score_parameter_decay_with_base, PeerScoreParams, PeerScoreThresholds, TopicScoreParams, }; pub use self::subscription_filter::{ AllowAllSubscriptionFilter, CallbackSubscriptionFilter, CombinedSubscriptionFilters, MaxCountSubscriptionFilter, RegexSubscriptionFilter, TopicSubscriptionFilter, WhitelistSubscriptionFilter, }; pub use self::topic::{Hasher, Topic, TopicHash}; pub use self::transform::{DataTransform, IdentityTransform}; pub use self::types::{Message, MessageAcceptance, MessageId, RawMessage};
will look like this:
pub use self::{ behaviour::{Behaviour, Event, MessageAuthenticity}, config::{Config, ConfigBuilder, ValidationMode, Version}, error::{ConfigBuilderError, PublishError, SubscriptionError, ValidationError}, metrics::Config as MetricsConfig, peer_score::{ score_parameter_decay, score_parameter_decay_with_base, PeerScoreParams, PeerScoreThresholds, TopicScoreParams, }, subscription_filter::{ AllowAllSubscriptionFilter, CallbackSubscriptionFilter, CombinedSubscriptionFilters, MaxCountSubscriptionFilter, RegexSubscriptionFilter, TopicSubscriptionFilter, WhitelistSubscriptionFilter, }, topic::{Hasher, Topic, TopicHash}, transform::{DataTransform, IdentityTransform}, types::{Message, MessageAcceptance, MessageId, RawMessage}, };
This is just one of the example across repo.
Yes
The text was updated successfully, but these errors were encountered:
Curios to know the opinions of the maintainers here :)
Sorry, something went wrong.
No branches or pull requests
Description
We can add a
rustfmt.toml
file to the repo and use some of the nightly features likeRead more about these configs in here.
Motivation
Highly improved code formatting and readability.
Formatting imports.
Formatting the code in doc as well.
Example: reth - rustfmt.toml
Current Implementation
This:
will look like this:
This is just one of the example across repo.
Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered: