Skip to content

Commit 7351001

Browse files
committed
removed lint warnings
1 parent 666d841 commit 7351001

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

cli/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4214,7 +4214,7 @@ fn localnet(
42144214
/// result assuming that a single run will only work with a single rust
42154215
/// workspace.
42164216
pub fn target_dir() -> Result<PathBuf> {
4217-
static TARGET_DIR: Lazy<Result<PathBuf>> = Lazy::new(|| target_dir_no_cache());
4217+
static TARGET_DIR: Lazy<Result<PathBuf>> = Lazy::new(target_dir_no_cache);
42184218
match &*TARGET_DIR {
42194219
Ok(path) => Ok(path.clone()),
42204220
Err(e) => Err(anyhow::anyhow!(e.to_string())),
@@ -4238,7 +4238,7 @@ fn target_dir_no_cache() -> Result<PathBuf> {
42384238
// the current dir is the desired behavior.
42394239
return Ok(PathBuf::from("target"));
42404240
}
4241-
eprintln!("'cargo metadata' failed with: {}", stderr_msg);
4241+
eprintln!("'cargo metadata' failed with: {stderr_msg}");
42424242
std::process::exit(output.status.code().unwrap_or(1));
42434243
}
42444244

tests/bench/tests/binary-size.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ describe("Binary size", () => {
1010
const binarySize: BinarySize = {};
1111

1212
it("Measure binary size", async () => {
13-
const output = execSync("cargo metadata --no-deps --format-version 1", {encoding: "utf8"});
13+
const output = execSync("cargo metadata --no-deps --format-version 1", {
14+
encoding: "utf8",
15+
});
1416
const metadata = JSON.parse(output);
1517
const stat = await fs.stat(
16-
path.join(metadata.target_directory, "deploy", `${IDL.metadata.name}.so`)
18+
path.join(metadata.target_directory, "deploy", `${IDL.metadata.name}.so`),
1719
);
1820
binarySize[IDL.metadata.name] = stat.size;
1921
});

ts/packages/anchor/src/workspace.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const workspace = new Proxy(
5555
//
5656
// To avoid the above problem with numbers, read the `idl` directory and
5757
// compare the camelCased version of both file names and `programName`.
58-
const output = execSync("cargo metadata --no-deps --format-version 1", {encoding: "utf8"});
58+
const output = execSync("cargo metadata --no-deps --format-version 1", {
59+
encoding: "utf8",
60+
});
5961
const metadata = JSON.parse(output);
6062
const idlDirPath = path.join(metadata.target_directory, "idl");
6163
const fileName = fs

0 commit comments

Comments
 (0)