Return Features & Target by reference in Compiler

This commit is contained in:
Syrus
2020-04-22 11:07:15 -07:00
parent 1fd8eb0cd4
commit f62f475309
3 changed files with 10 additions and 10 deletions

View File

@ -172,13 +172,13 @@ impl CraneliftCompiler {
impl Compiler for CraneliftCompiler {
/// Gets the WebAssembly features for this Compiler
fn features(&self) -> Features {
self.config.features().clone()
fn features(&self) -> &Features {
self.config.features()
}
/// Gets the target associated to the Cranelift ISA.
fn target(&self) -> Target {
self.config.target().clone()
fn target(&self) -> &Target {
self.config.target()
}
/// Compile the module using Cranelift, producing a compilation result with