Change PublicallyExported -> PubliclyExported

This commit is contained in:
blyxyas 2024-01-14 01:14:05 +01:00
parent 2469784cb6
commit 44f5d969d5
No known key found for this signature in database
GPG Key ID: 9698805551971573
5 changed files with 6 additions and 6 deletions

View File

@ -808,10 +808,10 @@ Whether to also run the listed lints on private items.
## `pub-underscore-fields-behavior`
Meow "public" fields in a struct that are prefixed with an underscore based on their
Lint "public" fields in a struct that are prefixed with an underscore based on their
exported visibility, or whether they are marked as "pub".
**Default Value:** `"PublicallyExported"`
**Default Value:** `"PubliclyExported"`
---
**Affected lints:**

View File

@ -551,7 +551,7 @@ pub fn get_configuration_metadata() -> Vec<ClippyConfiguration> {
///
/// Lint "public" fields in a struct that are prefixed with an underscore based on their
/// exported visibility, or whether they are marked as "pub".
(pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PublicallyExported),
(pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PubliclyExported),
}
/// Search for the configuration file.

View File

@ -129,6 +129,6 @@ fn serialize<S>(&self, _serializer: S) -> Result<S::Ok, S::Error>
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum PubUnderscoreFieldsBehaviour {
PublicallyExported,
PubliclyExported,
AllPubFields,
}

View File

@ -54,7 +54,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
};
let is_visible = |field: &FieldDef<'_>| match self.behavior {
PubUnderscoreFieldsBehaviour::PublicallyExported => cx.effective_visibilities.is_reachable(field.def_id),
PubUnderscoreFieldsBehaviour::PubliclyExported => cx.effective_visibilities.is_reachable(field.def_id),
PubUnderscoreFieldsBehaviour::AllPubFields => {
// If there is a visibility span then the field is marked pub in some way.
!field.vis_span.is_empty()

View File

@ -1 +1 @@
pub-underscore-fields-behavior = "PublicallyExported"
pub-underscore-fields-behavior = "PubliclyExported"