Repository navigation
Split workspace.rs into six files - #15
Merged
Merged
Conversation
The window's code moves into src/workspace/: the title bar, the pane tree, the palettes, plugins, and the socket API each get a file, and mod.rs keeps the window's state, its actions and the top-level drawing. Code is moved, not changed: tests go with what they test, and 28 items gain pub(super) so one file can reach another.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/workspace.rswas 3,271 lines holding pane state, session restore, drawing, the palettes, plugins and the socket API. It is now six files insrc/workspace/:mod.rstitlebar.rspanes.rssocket_api.rsplugin_host.rspalettes.rsCode is moved, not changed. Comparing every line with the original, the only differences are the module boilerplate, one signature rustfmt rewrapped, and four section-divider comments the files replace.
pub(super), only where one file has to reach another. Nothing is newly visible outsideworkspace.plugin_hostandsocket_apiare named that way becausepluginsandapiwould clash with the top-level modules.docs/development.mdlists the six files.Git shows
workspace.rsas deleted rather than renamed, because less than half of it stayed inmod.rs.git log --followandgit blame -Cstill trace the lines.Not done here:
handle_apiis still one 332-line function, now insocket_api.rs.