formating

This commit is contained in:
Zen 2021-05-14 06:59:04 +03:00
parent ed20b91fe5
commit 1151a6edf4
2 changed files with 9 additions and 7 deletions

2
rustfmt.toml Normal file
View file

@ -0,0 +1,2 @@
edition = "2018"
tab_spaces = 2

View file

@ -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(())
}