From 7e9aaeafe6a35c7ac652eed0298e0bd5fa4117e1 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sat, 21 Oct 2023 11:41:09 +0200 Subject: [PATCH] Fix lints --- Cargo.toml | 2 +- src/cli/utils/listing.rs | 5 ++--- src/lune/builtins/process/mod.rs | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2587191..ada36eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,6 @@ dunce = "1.0" lz4_flex = "0.11" path-clean = "1.0" pin-project = "1.0" -os_str_bytes = "6.4" urlencoding = "2.1" ### RUNTIME @@ -83,6 +82,7 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } mlua = { version = "0.9.1", features = ["luau", "luau-jit", "serialize"] } tokio = { version = "1.24", features = ["full", "tracing"] } +os_str_bytes = { version = "6.4", features = ["conversions"] } ### SERDE diff --git a/src/cli/utils/listing.rs b/src/cli/utils/listing.rs index 84d7e13..4145376 100644 --- a/src/cli/utils/listing.rs +++ b/src/cli/utils/listing.rs @@ -38,9 +38,8 @@ pub async fn find_lune_scripts(in_home_dir: bool) -> Result init_file, - _ => continue, + let Ok(init_file_path) = discover_script_path(dir_path, in_home_dir) else { + continue; }; let contents = fs::read(init_file_path).await?; diff --git a/src/lune/builtins/process/mod.rs b/src/lune/builtins/process/mod.rs index 154a21f..5443a01 100644 --- a/src/lune/builtins/process/mod.rs +++ b/src/lune/builtins/process/mod.rs @@ -99,7 +99,7 @@ fn process_env_get<'lua>( Some(value) => { let raw_value = RawOsString::new(value); Ok(LuaValue::String( - lua.create_string(raw_value.as_raw_bytes())?, + lua.create_string(raw_value.to_raw_bytes())?, )) } None => Ok(LuaValue::Nil), @@ -152,8 +152,8 @@ fn process_env_iter<'lua>( let raw_key = RawOsString::new(key); let raw_value = RawOsString::new(value); Ok(( - LuaValue::String(lua.create_string(raw_key.as_raw_bytes())?), - LuaValue::String(lua.create_string(raw_value.as_raw_bytes())?), + LuaValue::String(lua.create_string(raw_key.to_raw_bytes())?), + LuaValue::String(lua.create_string(raw_value.to_raw_bytes())?), )) } None => Ok((LuaValue::Nil, LuaValue::Nil)),