mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-24 18:18:06 +00:00
formating
This commit is contained in:
parent
ed20b91fe5
commit
1151a6edf4
2 changed files with 9 additions and 7 deletions
2
rustfmt.toml
Normal file
2
rustfmt.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
edition = "2018"
|
||||
tab_spaces = 2
|
14
src/lib.rs
14
src/lib.rs
|
@ -5,19 +5,19 @@ use std::process::{Command, Stdio};
|
|||
/// Formats the sum of two numbers as string.
|
||||
#[pyfunction]
|
||||
fn get_ffmpeg_info() -> PyResult<String> {
|
||||
let mut cmd = Command::new("ffmpeg");
|
||||
let mut cmd = Command::new("ffmpeg");
|
||||
|
||||
cmd.stderr(Stdio::piped());
|
||||
cmd.stderr(Stdio::piped());
|
||||
|
||||
let output = String::from_utf8(cmd.output().unwrap().stderr).unwrap();
|
||||
let output = String::from_utf8(cmd.output().unwrap().stderr).unwrap();
|
||||
|
||||
Ok(output)
|
||||
Ok(output)
|
||||
}
|
||||
|
||||
/// A Python module implemented in Rust.
|
||||
#[pymodule]
|
||||
fn av1an(_py: Python, m: &PyModule) -> PyResult<()> {
|
||||
m.add_function(wrap_pyfunction!(get_ffmpeg_info, m)?)?;
|
||||
fn av1an_rust(_py: Python, m: &PyModule) -> PyResult<()> {
|
||||
m.add_function(wrap_pyfunction!(get_ffmpeg_info, m)?)?;
|
||||
|
||||
Ok(())
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue