Cargill / splinter

A privacy-focused distributed platform - start splintering your network into circuits!
Apache License 2.0
106 stars 37 forks source link

Fix ServiceRequestGuard trait impl #2045

Closed Caleb-Hill closed 2 years ago

Caleb-Hill commented 2 years ago

The code this commit replaces could generate essentially endless cloned boxes and would overflow the stack. This change replaces the trait with a type declaration of an Arc wrapping the relevant trait object. This makes it so we don't actually need to duplicate the trait object everywhere and can just operate on references to to same one.

Signed-off-by: Caleb Hill hill@bitwise.io