Skip to content
New issue

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

refactor: Make selectors field private #87

Merged
merged 1 commit into from Sep 6, 2022
Merged

refactor: Make selectors field private #87

merged 1 commit into from Sep 6, 2022

Conversation

volsa
Copy link
Contributor

@volsa volsa commented Sep 6, 2022

A little pet peeve I came across when using this library (it's awesome btw!) was rust-analyzer suggesting often times the initialisation of the Selector struct manually since the selectors field is public. This PR changes the visibility from

pub struct Selector {
    pub selectors: SmallVec<[parser::Selector<Simple>; 1]>,
}

to

pub struct Selector {
    selectors: SmallVec<[parser::Selector<Simple>; 1]>,
}

No breaking changes are introduced as the selectors field isn't used directly anywhere outside the module anyways.

@volsa volsa changed the title refactor: Make Selector's field private refactor: Make selectors field private Sep 6, 2022
@teymour-aldridge
Copy link
Collaborator

Thanks!

No breaking changes are introduced as the selectors field isn't used directly anywhere outside the module anyways.

This is technically a breaking change (because the Selectors struct is public, and could previously be constructed outside the module), which is fine (we'll just bump from v0.13 to v0.14 in the next release).

@teymour-aldridge teymour-aldridge merged commit 0a6c6f5 into causal-agent:master Sep 6, 2022
@volsa
Copy link
Contributor Author

volsa commented Sep 6, 2022

This is technically a breaking change (because the Selectors struct is public, and could previously be constructed outside the module), which is fine (we'll just bump from v0.13 to v0.14 in the next release).

Oh that's true, I just assumed everyone's using the parse function as documented. Anyhow, thanks for merging and maintaining this awesome library!

@cfvescovo
Copy link
Collaborator

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants