Improved middleware logic

This commit is contained in:
Syrus Akbary
2021-04-27 14:00:25 -07:00
parent 01e97a3734
commit cb66b5293d
7 changed files with 7 additions and 22 deletions

View File

@ -43,8 +43,8 @@ impl SinglepassCompiler {
impl Compiler for SinglepassCompiler {
/// Get the middlewares for this compiler
fn get_middlewares(&self) -> Vec<Arc<dyn ModuleMiddleware>> {
self.config.get_middlewares()
fn get_middlewares(&self) -> &[Arc<dyn ModuleMiddleware>] {
&self.config.middlewares
}
/// Compile the module using Singlepass, producing a compilation result with