Closed rami3l closed 1 week ago
Based on the provided git diff
output, here are three observations and potential issues:
Unused Variable in hello.mbt
:
+pub let hello_list : @immut/list.T[String] = @immut/list.of(
+ ["Hello, ", "world!"],
+)
The variable hello_list
is defined but not used elsewhere in the file. This might be intentional, but if it's not, it could be a potential source of confusion or unnecessary code.
Error Handling in run_info
Function:
- let out = tokio::process::Command::new("mooninfo")
- .args(["-format=text", mi.display().to_string().as_str()])
- .output()
- .await?;
+ let mut mooninfo = tokio::process::Command::new("mooninfo");
+ mooninfo.arg("-format=text").arg(&mi);
+ if cmd.no_alias {
+ mooninfo.arg("-no-alias");
+ }
+ let out = mooninfo.output().await?;
The new code introduces a conditional argument addition based on cmd.no_alias
. However, the error handling (await?
) is unchanged. Ensure that any potential errors from mooninfo.output().await?
are properly handled or propagated.
Removed .mbti
Files:
diff --git a/crates/moon/tests/test_cases/mbti.in/lib/lib.mbti b/crates/moon/tests/test_cases/mbti.in/lib/lib.mbti
deleted file mode 100644
index 64108267..00000000
--- a/crates/moon/tests/test_cases/mbti.in/lib/lib.mbti
+++ /dev/null
@@ -1,11 +0,0 @@
-package username/hello/lib
-
-// Values
-fn hello() -> String
-
-// Types and methods
-
-// Traits
-
-// Extension Methods
-
diff --git a/crates/moon/tests/test_cases/mbti.in/main/main.mbti b/crates/moon/tests/test_cases/mbti.in/main/main.mbti
deleted file mode 100644
index 5df9ccd7..00000000
--- a/crates/moon/tests/test_cases/mbti.in/main/main.mbti
+++ /dev/null
@@ -1,10 +0,0 @@
-package username/hello/main
-
-// Values
-
-// Types and methods
-
-// Traits
-
-// Extension Methods
-
The .mbti
files for both lib
and main
packages have been deleted. Ensure that these deletions are intentional and that any functionality relying on these files is appropriately updated or replaced.
These observations highlight potential issues or areas that might require further attention to ensure the code changes are both correct and efficient.
This corresponds to the new option
-no-alias
recently introduced inmooninfo
: