Commit 68a9216
DataSource struct attribute public visibility (#3134)
## Description
This pull request makes a small change to the visibility of struct
fields in the `DataSource` struct.
The fields `data` and `stage` are now public, which allows them to be
accessed from outside the module.
Currently there is no way to override these attributes with custom
values externally.
This is required for FuelLabs/sway#7478 - as we
override these attributes to enable contract state forking in the PR.
## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)
### Before requesting review
- [x] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here
### After merging, notify other teams
[Add or remove entries as needed]
- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [x] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Expose `DataSource` fields `data` and `stage` publicly and add
corresponding changelog entry.
>
> - **State**:
> - `crates/fuel-core/src/state/data_source.rs`: Make `DataSource`
fields `data` and `stage` public.
> - **Changelog**:
> - `.changes/changed/3134.md`: Add entry noting public visibility of
`DataSource` fields.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ab6b0e3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: z <[email protected]>
Co-authored-by: Green Baneling <[email protected]>1 parent cbd82a2 commit 68a9216
File tree
2 files changed
+3
-2
lines changed- .changes/changed
- crates/fuel-core/src/state
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments