fix wasm repl warnings

This commit is contained in:
Anton-4 2024-07-13 18:45:01 +02:00
parent 070d14a5d6
commit 42a366481b
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
2 changed files with 7 additions and 2 deletions

View file

@ -2986,8 +2986,10 @@ fn update<'a>(
fn register_package_shorthands<'a>(
shorthands: &mut MutMap<&'a str, ShorthandPath>,
package_entries: &MutMap<&'a str, header::PackageName<'a>>,
#[allow(unused_variables)] // for wasm
module_path: &Path,
src_dir: &Path,
#[allow(unused_variables)] // for wasm
cache_dir: &Path,
) -> Result<(), LoadingProblem<'a>> {
for (shorthand, package_name) in package_entries.iter() {
@ -3650,6 +3652,8 @@ fn load_module<'a>(
#[derive(Debug)]
enum ShorthandPath {
/// e.g. "/home/rtfeldman/.cache/roc/0.1.0/oUkxSOI9zFGtSoIaMB40QPdrXphr1p1780eiui2iO9Mz"
#[allow(dead_code)]
// wasm warns FromHttpsUrl is unused, but errors if it is removed ¯\_(ツ)_/¯
FromHttpsUrl {
/// e.g. "/home/rtfeldman/.cache/roc/0.1.0/oUkxSOI9zFGtSoIaMB40QPdrXphr1p1780eiui2iO9Mz"
root_module_dir: PathBuf,
@ -4060,6 +4064,7 @@ fn load_packages<'a>(
app_module_id: Option<ModuleId>,
module_ids: Arc<Mutex<PackageModuleIds<'a>>>,
ident_ids_by_module: SharedIdentIdsByModule,
#[allow(unused_variables)] // for wasm
filename: PathBuf,
) {
// Load all the packages