Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Impl for other type#58

Merged
VictorKoenders merged 2 commits intotrunkfrom
impl_for_other_type
May 17, 2023
Merged

Impl for other type#58
VictorKoenders merged 2 commits intotrunkfrom
impl_for_other_type

Conversation

@VictorKoenders
Copy link
Contributor

Added the ability to generate an ImplFor struct for another type, different than what the generator is based on.

generator.impl_for_other_type("Foo");

// will output:
// impl Foo { }
generator.impl_trait_for_other_type("Foo", "Bar");

// will output:
// impl Foo for Bar { }

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 64.51% and project coverage change: +0.15 🎉

Comparison is base (fdb9209) 48.35% compared to head (7688cf4) 48.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk      #58      +/-   ##
==========================================
+ Coverage   48.35%   48.51%   +0.15%     
==========================================
  Files          19       20       +1     
  Lines        2035     2047      +12     
==========================================
+ Hits          984      993       +9     
- Misses       1051     1054       +3     
Impacted Files Coverage Δ
src/generate/gen_struct.rs 0.00% <0.00%> (ø)
src/generate/generator.rs 50.00% <22.22%> (-5.56%) ⬇️
src/generate/mod.rs 80.00% <80.00%> (ø)
src/generate/impl_for.rs 45.26% <100.00%> (+4.26%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@VictorKoenders VictorKoenders merged commit e712e86 into trunk May 17, 2023
@VictorKoenders VictorKoenders deleted the impl_for_other_type branch May 17, 2023 06:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant