mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Fix escaping of the wasm file path (#6018)
* Fix escaping of the wasm file path * Add separate methods for escaped paths
This commit is contained in:
@@ -37,9 +37,9 @@ use itertools::Itertools;
|
||||
pub struct WasmBinaryBloaty(PathBuf);
|
||||
|
||||
impl WasmBinaryBloaty {
|
||||
/// Returns the path to the bloaty wasm binary.
|
||||
pub fn wasm_binary_bloaty_path(&self) -> String {
|
||||
self.0.display().to_string().replace('\\', "/")
|
||||
/// Returns the escaped path to the bloaty wasm binary.
|
||||
pub fn wasm_binary_bloaty_path_escaped(&self) -> String {
|
||||
self.0.display().to_string().escape_default().to_string()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,13 @@ pub struct WasmBinary(PathBuf);
|
||||
|
||||
impl WasmBinary {
|
||||
/// Returns the path to the wasm binary.
|
||||
pub fn wasm_binary_path(&self) -> String {
|
||||
self.0.display().to_string().replace('\\', "/")
|
||||
pub fn wasm_binary_path(&self) -> &Path {
|
||||
&self.0
|
||||
}
|
||||
|
||||
/// Returns the escaped path to the wasm binary.
|
||||
pub fn wasm_binary_path_escaped(&self) -> String {
|
||||
self.0.display().to_string().escape_default().to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user