Skip to content

Commit 6902eca

Browse files
committed
Fix various new clippy lints
1 parent dc08b91 commit 6902eca

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

crates/lune-roblox/src/document/postprocessing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141
}
4242

4343
fn remove_matching_prop(inst: &mut DomInstance, ty: DomType, name: &'static str) {
44-
if inst.properties.get(name).map_or(false, |u| u.ty() == ty) {
44+
if inst.properties.get(name).is_some_and(|u| u.ty() == ty) {
4545
inst.properties.remove(name);
4646
}
4747
}

crates/lune-roblox/src/shared/userdata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn make_list_writer() -> Box<ListWriter> {
2323
})
2424
}
2525

26-
/**
26+
/*
2727
Userdata metamethod implementations
2828
2929
Note that many of these return [`LuaResult`] even though they don't

crates/lune-std-datetime/src/values.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ where
6060
}
6161
}
6262

63-
/**
63+
/*
6464
Conversion methods between `DateTimeValues` and plain lua tables
6565
6666
Note that the `IntoLua` implementation here uses a read-only table,
@@ -117,7 +117,7 @@ impl IntoLua<'_> for DateTimeValues {
117117
}
118118
}
119119

120-
/**
120+
/*
121121
Conversion methods between chrono's timezone-aware `DateTime` to
122122
and from our non-timezone-aware `DateTimeValues` values struct
123123
*/

crates/lune-std-process/src/tee_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
}
3434
}
3535

36-
impl<'a, W> AsyncWrite for AsyncTeeWriter<'a, W>
36+
impl<W> AsyncWrite for AsyncTeeWriter<'_, W>
3737
where
3838
W: AsyncWrite + Unpin,
3939
{

crates/lune-std-serde/src/compress_decompress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<'lua> FromLua<'lua> for CompressDecompressFormat {
117117
118118
Errors when the compression fails.
119119
*/
120-
pub async fn compress<'lua>(
120+
pub async fn compress(
121121
source: impl AsRef<[u8]>,
122122
format: CompressDecompressFormat,
123123
level: Option<i32>,
@@ -163,7 +163,7 @@ pub async fn compress<'lua>(
163163
164164
Errors when the decompression fails.
165165
*/
166-
pub async fn decompress<'lua>(
166+
pub async fn decompress(
167167
source: impl AsRef<[u8]>,
168168
format: CompressDecompressFormat,
169169
) -> LuaResult<Vec<u8>> {

crates/lune-std/src/globals/require/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ impl RequireContext {
150150
self.get_from_cache(lua, abs_path.as_ref())
151151
}
152152

153-
async fn load<'lua>(
153+
async fn load(
154154
&self,
155-
lua: &'lua Lua,
155+
lua: &Lua,
156156
abs_path: impl AsRef<Path>,
157157
rel_path: impl AsRef<Path>,
158158
) -> LuaResult<LuaRegistryKey> {

crates/lune/src/cli/utils/files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ pub fn discover_script_path(path: impl AsRef<str>, in_home_dir: bool) -> Result<
6464
// NOTE: We use metadata directly here to try to
6565
// avoid accessing the file path more than once
6666
let file_meta = file_path.metadata();
67-
let is_file = file_meta.as_ref().map_or(false, Metadata::is_file);
68-
let is_dir = file_meta.as_ref().map_or(false, Metadata::is_dir);
67+
let is_file = file_meta.as_ref().is_ok_and(Metadata::is_file);
68+
let is_dir = file_meta.as_ref().is_ok_and(Metadata::is_dir);
6969
let is_abs = file_path.is_absolute();
7070
let ext = file_path.extension();
7171
if is_file {

crates/mlua-luau-scheduler/src/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl<'lua> LuaSchedulerExt<'lua> for Lua {
334334
}
335335
}
336336

337-
impl<'lua> LuaSpawnExt<'lua> for Lua {
337+
impl LuaSpawnExt<'_> for Lua {
338338
fn spawn<F, T>(&self, fut: F) -> Task<T>
339339
where
340340
F: Future<Output = T> + Send + 'static,

0 commit comments

Comments
 (0)