Skip to content

Commit

Permalink
Extend lifetime of layers from GroupLayer::get_layer (#307)
Browse files Browse the repository at this point in the history
* Extend lifetime of layers from GroupLayer::get_layer

* Fix changelog
  • Loading branch information
aleokdev authored Aug 19, 2024
1 parent 8c4f5b4 commit 3e53106
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Improved documentation on `Map::layers` and `Map::get_layer`. (#306)
- Extend lifetime of `Layer`s returned from `GroupLayer::get_layer` to the map's. (#307)

## [0.12.0]
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/layers/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl<'map> GroupLayer<'map> {
.map(move |layer| Layer::new(map, layer))
}
/// Gets a specific layer from the group by index.
pub fn get_layer(&self, index: usize) -> Option<Layer> {
pub fn get_layer(&self, index: usize) -> Option<Layer<'map>> {
self.data
.layers
.get(index)
Expand Down

0 comments on commit 3e53106

Please sign in to comment.