Skip to content

Commit

Permalink
Make ClassFieldInner private
Browse files Browse the repository at this point in the history
Summary:
This shouldn't be public - anyone trying to access it really ought to be
defining helper methods in *this* module, in order to not break up modularity
and make refactors challenging (which is exactly what I've been doing in this
stack - moving use cases that were reaching into the guts into helper methods).

Reviewed By: grievejia

Differential Revision: D70111383

fbshipit-source-id: da96f8978c40f83d774efdc3080e23548261b94a
  • Loading branch information
stroxler authored and facebook-github-bot committed Feb 24, 2025
1 parent ae18b30 commit 70f28f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyre2/pyre2/lib/alt/class/class_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ impl ClassFieldInitialization {
/// know whether it is initialized in the class body in order to determine
/// both visibility rules and whether method binding should be performed.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ClassField(pub ClassFieldInner);
pub struct ClassField(ClassFieldInner);

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ClassFieldInner {
enum ClassFieldInner {
Simple {
ty: Type,
range: Option<TextRange>,
Expand Down

0 comments on commit 70f28f1

Please sign in to comment.