Skip to content

refactor: modularize CollectionAllocErr into errors.rs - #514

Open
yunaremaia wants to merge 1 commit into
servo:v2from
yunaremaia:fix/513-errors-module
Open

refactor: modularize CollectionAllocErr into errors.rs#514
yunaremaia wants to merge 1 commit into
servo:v2from
yunaremaia:fix/513-errors-module

Conversation

@yunaremaia

Copy link
Copy Markdown

Summary

Modularizes CollectionAllocErr as requested in #513.

  • Creates src/errors.rs containing the CollectionAllocErr enum and its Display/Error implementations
  • Removes the same definitions from src/lib.rs
  • Re-exports the type via pub use errors::CollectionAllocErr to preserve the public API

Testing

  • cargo check passes
  • cargo test --all-targets passes (66 tests)
  • Verified CollectionAllocErr remains accessible as smallvec::CollectionAllocErr
  • Pre-existing clippy warnings/errors unchanged (verified against base)

Fixes #513

Move CollectionAllocErr enum and its Display/Error impls from lib.rs
to a dedicated src/errors.rs module, re-exporting it from lib.rs to
preserve the public API.

Fixes servo#513
Comment thread src/errors.rs
Comment on lines +1 to +6
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to include this, it can be removed

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

you have to run cargo fmt --all

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.

modularize error CollectionAllocErr

2 participants