fix(review): as dependency using wrong binary
The order of Backend::{get_binary,get_binary_inner} was wrong.
The binary was actually never overwritten.
This commit is contained in:
@@ -28,7 +28,7 @@ const SUPPORTS_AS_DEPENDENCY: bool = true;
|
||||
impl Backend for Arch {
|
||||
impl_backend_constants!();
|
||||
|
||||
fn get_binary_inner(&self) -> Text {
|
||||
fn get_binary(&self) -> Text {
|
||||
let r#box = self.binary.clone().into_boxed_str();
|
||||
Box::leak(r#box)
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ pub(in crate::backend) type Switches = &'static [&'static str];
|
||||
pub(in crate::backend) type Text = &'static str;
|
||||
|
||||
pub trait Backend: Debug {
|
||||
fn get_binary(&self) -> Text;
|
||||
fn get_binary_inner(&self) -> Text {
|
||||
self.get_binary()
|
||||
fn get_binary(&self) -> Text {
|
||||
self.get_binary_default()
|
||||
}
|
||||
fn get_binary_default(&self) -> Text;
|
||||
fn get_section(&self) -> Text;
|
||||
|
||||
fn get_switches_info(&self) -> Switches;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#[macro_export]
|
||||
macro_rules! impl_backend_constants {
|
||||
() => {
|
||||
fn get_binary(&self) -> Text {
|
||||
fn get_binary_default(&self) -> Text {
|
||||
BINARY
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user