Skip to content

Commit bc42788

Browse files
committed
Fix compilation error: wrap io::Error in Err() for non-Linux platforms
1 parent 37ff678 commit bc42788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/profiler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ impl JfrFile {
3232

3333
#[cfg(not(target_os = "linux"))]
3434
fn new() -> Result<Self, io::Error> {
35-
io::Error::new(
35+
Err(io::Error::new(
3636
io::ErrorKind::Other,
3737
"async-profiler is only supported on Linux",
38-
)
38+
))
3939
}
4040

4141
fn swap(&mut self) {

0 commit comments

Comments
 (0)