diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..23fc248 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +edition = "2018" +tab_spaces = 2 diff --git a/src/lib.rs b/src/lib.rs index b100cd8..b28d536 100644 --- a/src/lib.rs +++ b/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 { - 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(()) }