Skip to content

Commit

Permalink
beautification
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha committed Nov 1, 2020
1 parent a5f3e5e commit e7b42d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions capara/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class ProfilerEntry(NamedTuple):
file_name: str
func_name: str
# Duration in nanoseconds.
duration: Optional[int]
call_index: int

Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ fn get_context(py: Python, obj: *mut pyo3::ffi::PyObject) -> Option<Py<ProfilerC
_ => return None,
};
}

let context = unsafe { Py::from_owned_ptr_or_opt(py, context_obj)? };
if context.is_none(py) {
None
Expand Down Expand Up @@ -242,7 +241,6 @@ fn start(context_var: &PyAny) -> PyResult<()> {
}

#[pymodule]
/// A Python module implemented in Rust.
fn capara(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(start, m)?)?;
m.add_class::<ProfilerContext>()?;
Expand Down

0 comments on commit e7b42d9

Please sign in to comment.