Fix clippy lint warnings (#1004)

This commit is contained in:
Jack T
2025-01-13 10:07:53 -08:00
committed by GitHub
parent f33d1f1cc4
commit 55a207a275
18 changed files with 69 additions and 76 deletions

View File

@@ -124,11 +124,11 @@ mod test {
imfs.load_snapshot("/foo.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/foo.lua"),
"foo",
ScriptType::Module,
@@ -147,11 +147,11 @@ mod test {
imfs.load_snapshot("/foo.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/foo.lua"),
"foo",
ScriptType::Module,
@@ -170,11 +170,11 @@ mod test {
imfs.load_snapshot("/foo.server.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/foo.server.lua"),
"foo",
ScriptType::Server,
@@ -193,11 +193,11 @@ mod test {
imfs.load_snapshot("/foo.server.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/foo.server.lua"),
"foo",
ScriptType::Server,
@@ -216,11 +216,11 @@ mod test {
imfs.load_snapshot("/foo.client.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/foo.client.lua"),
"foo",
ScriptType::Client,
@@ -239,11 +239,11 @@ mod test {
imfs.load_snapshot("/foo.client.lua", VfsSnapshot::file("Hello there!"))
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/foo.client.lua"),
"foo",
ScriptType::Client,
@@ -266,11 +266,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/root"),
"root",
ScriptType::Module,
@@ -300,11 +300,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/foo.lua"),
"foo",
ScriptType::Module,
@@ -334,11 +334,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/foo.lua"),
"foo",
ScriptType::Module,
@@ -368,11 +368,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/foo.server.lua"),
"foo",
ScriptType::Server,
@@ -402,11 +402,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/foo.server.lua"),
"foo",
ScriptType::Server,
@@ -438,11 +438,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(true)),
&mut vfs,
&vfs,
Path::new("/bar.server.lua"),
"bar",
ScriptType::Server,
@@ -474,11 +474,11 @@ mod test {
)
.unwrap();
let mut vfs = Vfs::new(imfs);
let vfs = Vfs::new(imfs);
let instance_snapshot = snapshot_lua(
&InstanceContext::with_emit_legacy_scripts(Some(false)),
&mut vfs,
&vfs,
Path::new("/bar.server.lua"),
"bar",
ScriptType::Server,