Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jan 28, 2022
1 parent f5020b6 commit 5083ecc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ impl Model {
}

pub fn lib_path(&self) -> String {
let name = self.name();

let file = if cfg!(windows) {
format!("{}.dll", self.name())
format!("{}.dll", name)
} else if cfg!(target_os = "macos") {
format!("lib{}.dylib", self.name())
format!("lib{}.dylib", name)
} else {
//Unix
format!("lib{}.so", self.name())
format!("lib{}.so", name)
};

format!("{}/target/debug/{}", self.path(), file)
Expand Down

0 comments on commit 5083ecc

Please sign in to comment.