PistonDevelopers / dyon

A rusty dynamically typed scripting language
Apache License 2.0
1.77k stars 55 forks source link

Use function pointer instead of `ModuleResolver` trait #704

Closed bvssvni closed 2 years ago

bvssvni commented 2 years ago

See https://github.com/PistonDevelopers/dyon/pull/702

This PR introduces a trait ModuleResolver to allow custom module resolution. The trait method does not depend on the object, so one could use a function pointer instead.