mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-04 17:40:50 +00:00
minor: correct some typos
This commit is contained in:
parent
b0be2967cc
commit
ba2910a3a7
20 changed files with 402 additions and 205 deletions
|
@ -106,9 +106,9 @@ fn read_section<'a>(dylib_binary: &'a [u8], section_name: &str) -> io::Result<&'
|
|||
/// <https://github.com/rust-lang/rust-analyzer/issues/6174>
|
||||
pub fn read_version(dylib_path: &AbsPath) -> io::Result<String> {
|
||||
let dylib_file = File::open(dylib_path)?;
|
||||
let dylib_mmaped = unsafe { Mmap::map(&dylib_file) }?;
|
||||
let dylib_mmapped = unsafe { Mmap::map(&dylib_file) }?;
|
||||
|
||||
let dot_rustc = read_section(&dylib_mmaped, ".rustc")?;
|
||||
let dot_rustc = read_section(&dylib_mmapped, ".rustc")?;
|
||||
|
||||
// check if magic is valid
|
||||
if &dot_rustc[0..4] != b"rust" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue