mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use Box for Wrapper implementation
This won't raise on invalid casts. It should reduce the amount of instantiated types and methods.
This commit is contained in:
parent
18a03b02fe
commit
e209fe3eb5
2 changed files with 4 additions and 32 deletions
|
@ -10,9 +10,4 @@ Spectator.describe Spectator::Wrapper do
|
|||
wrapper = described_class.new(Int32)
|
||||
expect(wrapper.get { Int32 }).to eq(Int32)
|
||||
end
|
||||
|
||||
it "raises on invalid cast" do
|
||||
wrapper = described_class.new(42)
|
||||
expect { wrapper.get(String) }.to raise_error(TypeCastError)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue