Skip to content

Commit ca488c2

Browse files
simplify path to str conversion
1 parent b4ec4ac commit ca488c2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

plotly_kaleido/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,10 @@ impl Kaleido {
183183
height: usize,
184184
scale: f64,
185185
) -> Result<String, Box<dyn std::error::Error>> {
186-
let p = self.cmd_path.as_path();
187-
let p = p.to_str().unwrap();
188-
let p = String::from(p);
186+
let p = self.cmd_path.to_str().unwrap();
189187

190188
#[allow(clippy::zombie_processes)]
191-
let mut process = Command::new(p.as_str())
189+
let mut process = Command::new(p)
192190
.current_dir(self.cmd_path.parent().unwrap())
193191
.args([
194192
"plotly",

0 commit comments

Comments
 (0)