diff --git a/examples/cli/cli-platform/src/lib.rs b/examples/cli/cli-platform/src/lib.rs index 2d41137305..61b2036195 100644 --- a/examples/cli/cli-platform/src/lib.rs +++ b/examples/cli/cli-platform/src/lib.rs @@ -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; diff --git a/examples/gui/breakout/platform/src/lib.rs b/examples/gui/breakout/platform/src/lib.rs index 196a65c017..51378f8ddc 100644 --- a/examples/gui/breakout/platform/src/lib.rs +++ b/examples/gui/breakout/platform/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(unused)] + mod graphics; mod gui; mod roc; diff --git a/examples/static-site-gen/platform/src/lib.rs b/examples/static-site-gen/platform/src/lib.rs index 28f0070eba..a24332fbb4 100644 --- a/examples/static-site-gen/platform/src/lib.rs +++ b/examples/static-site-gen/platform/src/lib.rs @@ -283,11 +283,16 @@ fn find_files(dir: &Path, file_paths: &mut Vec) -> 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 {