`EvaluationResult` and related structs' fields are public

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start by finding the EvaluationResult, FlagResult and SegmentResult struct definitions and their public field declarations, then check which of these are only read by callers. Decide which structs are read-only before changing anything, since the issue says "etc." without listing them all. Done means those fields are private, public getters exist, and the crate's existing tests still pass.

Written by the indexing model from the issue text.

Description

Declaring EvaluationResult, FlagResult, SegmentResult etc. fields as public suggests that we support consumers constructing them, which we in fact do not.

For read-only structs, we should make the fields private, and expose public getters instead.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
23h 26m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Flagsmith/flagsmith-rust-flag-engine

All issues in Flagsmith/flagsmith-rust-flag-engine

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.