mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
fix some clippy warnings in platforms
This commit is contained in:
parent
86671d659c
commit
8546f2c52b
3 changed files with 11 additions and 5 deletions
|
@ -9,10 +9,9 @@ use core::mem::MaybeUninit;
|
|||
use glue::Metadata;
|
||||
use roc_std::{RocDict, RocList, RocResult, RocStr};
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use std::ffi::{CStr, OsStr};
|
||||
use std::ffi::{ OsStr};
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::os::raw::c_char;
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(unused)]
|
||||
|
||||
mod graphics;
|
||||
mod gui;
|
||||
mod roc;
|
||||
|
|
|
@ -283,11 +283,16 @@ fn find_files(dir: &Path, file_paths: &mut Vec<PathBuf>) -> std::io::Result<()>
|
|||
/// and there seems to be no good way to strip it. So we resort to some string manipulation.
|
||||
pub fn strip_windows_prefix(path_buf: PathBuf) -> std::path::PathBuf {
|
||||
#[cfg(not(windows))]
|
||||
return path_buf;
|
||||
{
|
||||
path_buf
|
||||
}
|
||||
|
||||
let path_str = path_buf.display().to_string();
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let path_str = path_buf.display().to_string();
|
||||
|
||||
std::path::Path::new(path_str.trim_start_matches(r"\\?\")).to_path_buf()
|
||||
std::path::Path::new(path_str.trim_start_matches(r"\\?\")).to_path_buf()
|
||||
}
|
||||
}
|
||||
|
||||
fn is_roc_code_block(cbk: &pulldown_cmark::CodeBlockKind) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue