Closed sgt0 closed 1 week ago
Attention: Patch coverage is 35.86207%
with 93 lines
in your changes missing coverage. Please review.
Project coverage is 27.20%. Comparing base (
7c1b3b8
) to head (74c26f9
). Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I wanted to use
Plugin.invoke()
to call another plugin, but found that it required aMapRef<'_>
and there wasn't an ergonomic way to dereference aMap
into aMapRef
. The only way I saw to get aMapRef
was to do:To make this easier, I refactored
Map
,MapMut
, andMapRef
into justMap
andMapRef
, with implementations forAsRef
,Borrow
,Deref
, etc. The same general pattern is still here, with one type being an owned map and the other being a borrowed one, but there's one less type now and no explicit lifetimes. Methods that did not require ownership of the map have been moved toMapRef
.Now the above code can be written as:
Also added a second sample filter to the sample plugin to demonstrate it.