Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: assorted cleanups of store #6577

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Apr 11, 2022

  • use consistent spelling for io::Reslut
  • replace e.into() with more explicit io::Error::from
  • implement From rather than Into
  • reduce minor code duplication by delegating to existing functions
  • use Arc::clone to make it explicit flow around store's identity
  • use buffered writer when dumping store to a file
  • fix latent bug around comparing wide pointers Consider warning when comparing wide pointers with vtables (as their address identity is unstable) rust-lang/rust#69757.
    I thing we should not be hit by that due to full LTO, but that was a scary one.
  • remove some extra clones when working with cache

* use consistent spelling for `io::Reslut`
* repplace `e.into()` with more explicit `io::Error::from`
* implement From rather than Into
* reduce minore code duplication by delegating to existing functions
* use Arc::clone to make it explicit flow around store's identity
* use buffered writer when dumping store to a file
* fix latent bug around comparing wide pointers rust-lang/rust#69757.
  I thing we should not be hit by that due to full LTO, but that was a scary one.
* remove some extra clones when working with cache
@matklad matklad requested a review from a team as a code owner April 11, 2022 16:22
@matklad matklad requested review from nikurt and mm-near and removed request for nikurt April 11, 2022 16:22
core/store/src/lib.rs Show resolved Hide resolved
core/store/src/lib.rs Outdated Show resolved Hide resolved
core/store/src/lib.rs Outdated Show resolved Hide resolved
@near-bulldozer near-bulldozer bot merged commit d6b2999 into near:master Apr 11, 2022
pompon0 pushed a commit that referenced this pull request Apr 15, 2022
* use consistent spelling for `io::Reslut`
* replace `e.into()` with more explicit `io::Error::from`
* implement From rather than Into
* reduce minor code duplication by delegating to existing functions
* use Arc::clone to make it explicit flow around store's identity
* use buffered writer when dumping store to a file
* fix latent bug around comparing wide pointers rust-lang/rust#69757.
  I thing we should not be hit by that due to full LTO, but that was a scary one.
* remove some extra clones when working with cache
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.

2 participants