refactor(notebook): remove more dead code from NotebookState and lib.rs#559
Merged
refactor(notebook): remove more dead code from NotebookState and lib.rs#559
Conversation
Continued cleanup for #556. notebook_state.rs: - Remove new_empty() — all production callers use new_empty_with_runtime - Remove get_code_cell_ids — zero production callers - Remove serialize() — zero production callers (daemon handles save) - Make cell_to_frontend private — only called by cells_for_frontend lib.rs: - Remove debug_get_automerge_state — zero frontend callers, reads the relay's middle-copy doc which is no longer the interesting view - Remove debug_get_local_state — same, redundant with WASM doc Rewrites 5 tests from new_empty() to new_empty_with_runtime(Runtime::Python). Removes 7 tests for deleted methods. 11 notebook_state tests still passing. -243 lines.
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.
Continued cleanup for #556.
notebook_state.rs (−170 lines)
new_empty()new_empty_with_runtime— this was the unparameterized convenience methodget_code_cell_idsserialize()cell_to_frontendvisibilitypub→ private — only called bycells_for_frontendin the same filelib.rs (−73 lines)
debug_get_automerge_statedebug_get_local_state5 tests rewritten to use
new_empty_with_runtime(Runtime::Python). 7 tests for deleted methods removed. 11 notebook_state tests + 140 total still passing.−243 lines.