Skip to content

refactor file dropping to use a single Vec instead of two#571

Open
Bonsix wants to merge 2 commits intonot-fl3:masterfrom
Bonsix:dropped_file
Open

refactor file dropping to use a single Vec instead of two#571
Bonsix wants to merge 2 commits intonot-fl3:masterfrom
Bonsix:dropped_file

Conversation

@Bonsix
Copy link
Contributor

@Bonsix Bonsix commented Jul 25, 2025

A change that I noticed could be done in file dropping. There's two Vecs related to dropped files, one for storing the paths and the other for storing the bytes of the files. I thought that having this done as a single Vec of a new DroppedFile struct containing both the path to the file and the bytes of the file is probably a more obvious way of doing this, instead of having two separate Vecs that are ultimately still connected. It also allows for easier further changes, as now you can work with the entire file structs instead of needing to worry about whether or not the Vecs actually match in content counts (which they should always do)

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.

1 participant