Michael-F-Bryan / latex-rs

An ergonomic library for programatically generating LaTeX documents and reports.
MIT License
54 stars 16 forks source link

Implement Extend trait on Document.preamble and Document #16

Closed ratmice closed 5 years ago

ratmice commented 5 years ago

I had a need to add a collection of elements, and had some trouble trying to do so using the push function and convincing the borrow checker about self, I saw the Extend trait and implemented that,

I'm still somewhat new to using rust, so I'm not sure if this works as cohesively with the rest of the library with regards to the Into<PreambleElement> trait or if I need change it to that.

Thanks.

Michael-F-Bryan commented 5 years ago

This looks like a nice use-case for the Extend trait. Thanks for the PR @ratmice!

Michael-F-Bryan commented 5 years ago

New patch release uploaded to crates.io :tada: