Skip to content

Commit 939a1ff

Browse files
committed
Fix clippy: needless_return and std_instead_of_core
1 parent 026eb24 commit 939a1ff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/vm/src/stdlib/posix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,14 +935,14 @@ pub mod module {
935935
Ok(n) => n,
936936
Err(_) => return 0,
937937
};
938-
let line = match std::str::from_utf8(&buf[..n]) {
938+
let line = match core::str::from_utf8(&buf[..n]) {
939939
Ok(s) => s,
940940
Err(_) => return 0,
941941
};
942942
if let Some(field) = line.split_whitespace().nth(19) {
943943
return field.parse::<isize>().unwrap_or(0);
944944
}
945-
return 0;
945+
0
946946
}
947947
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
948948
{

0 commit comments

Comments
 (0)