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 glue::Metadata;
|
||||||
use roc_std::{RocDict, RocList, RocResult, RocStr};
|
use roc_std::{RocDict, RocList, RocResult, RocStr};
|
||||||
use std::borrow::{Borrow, Cow};
|
use std::borrow::{Borrow, Cow};
|
||||||
use std::ffi::{CStr, OsStr};
|
use std::ffi::{ OsStr};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::os::raw::c_char;
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(unused)]
|
||||||
|
|
||||||
mod graphics;
|
mod graphics;
|
||||||
mod gui;
|
mod gui;
|
||||||
mod roc;
|
mod roc;
|
||||||
|
|
|
@ -283,12 +283,17 @@ 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.
|
/// 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 {
|
pub fn strip_windows_prefix(path_buf: PathBuf) -> std::path::PathBuf {
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
return path_buf;
|
{
|
||||||
|
path_buf
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
let path_str = path_buf.display().to_string();
|
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 {
|
fn is_roc_code_block(cbk: &pulldown_cmark::CodeBlockKind) -> bool {
|
||||||
match cbk {
|
match cbk {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue