servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
678 stars 100 forks source link

Add `iter` to `MultiSource`, and `as_any` to `Source` #172

Closed derekdreery closed 3 years ago

derekdreery commented 3 years ago

The iter/iter_mut methods allow iterating through the subsources of a MultiSource. The as_any/as_mut_any methods are necessary for downcasting Sources into concrete types.

In addition, the find_source and find_source_mut methods are added as a convenience to find the first source matching the given type.

jdm commented 3 years ago

@bors-servo r+

bors-servo commented 3 years ago

:pushpin: Commit bed0e68 has been approved by jdm

bors-servo commented 3 years ago

:hourglass: Testing commit bed0e689b090efea5765405607d8a2b37cf7b8a4 with merge da337c459c6f78e29a1e5db8ecd0a3907de17667...

bors-servo commented 3 years ago

:sunny: Test successful - checks-travis Approved by: jdm Pushing da337c459c6f78e29a1e5db8ecd0a3907de17667 to master...

derekdreery commented 3 years ago

Awesome thanks for responding to PRs so fast! :smile: