We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1cb4ba commit d4811a9Copy full SHA for d4811a9
library/std_detect/src/detect/os/linux/mod.rs
@@ -15,7 +15,7 @@ fn read_file(orig_path: &str) -> Result<Vec<u8>, alloc::string::String> {
15
unsafe {
16
let file = libc::open(path.as_ptr() as *const libc::c_char, libc::O_RDONLY);
17
if file == -1 {
18
- return Err(format!("Cannot open file at {orig_path}: {}",*libc::__errno_location()));
+ return Err(format!("Cannot open file at {orig_path}"));
19
}
20
21
let mut data = Vec::new();
@@ -25,10 +25,7 @@ fn read_file(orig_path: &str) -> Result<Vec<u8>, alloc::string::String> {
25
match libc::read(file, spare.as_mut_ptr() as *mut _, spare.len()) {
26
-1 => {
27
libc::close(file);
28
- return Err(format!(
29
- "Error while reading from file at {orig_path}: {}",
30
- *libc::__errno_location()
31
- ));
+ return Err(format!("Error while reading from file at {orig_path}"));
32
33
0 => break,
34
n => data.set_len(data.len() + n as usize),
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments