diff --git a/src/profiler.rs b/src/profiler.rs index 0e6f702..ed4f366 100644 --- a/src/profiler.rs +++ b/src/profiler.rs @@ -32,10 +32,9 @@ impl JfrFile { #[cfg(not(target_os = "linux"))] fn new() -> Result { - io::Error::new( - io::ErrorKind::Other, + Err(io::Error::other( "async-profiler is only supported on Linux", - ) + )) } fn swap(&mut self) {