Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove warnings #116

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/_modules/Fs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ library fs {
/// @dev Obtains the metadata of the specified file or directory.
/// @param fileOrDir The path to the file or directory.
/// @return data The metadata of the file or directory.
function metadata(string memory fileOrDir) internal returns (FsMetadata memory data) {
function metadata(string memory fileOrDir) internal view returns (FsMetadata memory data) {
Hevm.FsMetadata memory md = vulcan.hevm.fsMetadata(fileOrDir);
assembly {
data := md
Expand Down Expand Up @@ -103,7 +103,7 @@ library fs {
/// @dev Checks if a file or directory exists.
/// @param path The file or directory to check.
/// @return Whether the file on `path` exists or not.
function fileExists(string memory path) internal returns (bool) {
function fileExists(string memory path) internal view returns (bool) {
try vulcan.hevm.fsMetadata(path) {
return true;
} catch Error(string memory) {
Expand Down
4 changes: 2 additions & 2 deletions src/_utils/println.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pragma solidity >=0.8.13 <0.9.0;
import {console} from "../_modules/Console.sol";
import {fmt} from "../_modules/Fmt.sol";

function println(string memory template, bytes memory args) view {
function println(string memory template, bytes memory args) pure {
console.log(fmt.format(template, args));
}

function println(string memory arg) view {
function println(string memory arg) pure {
console.log(arg);
}
2 changes: 1 addition & 1 deletion test/ExampleTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract ExampleTest is Test {
expect(false).toEqual(false);
}

function testConsoleLog() external view {
function testConsoleLog() external pure {
console.log("hello world");
}

Expand Down