mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 18:52:58 +03:00
cargo +nightly clippy
This commit is contained in:
parent
fe88b73f82
commit
873fcc9637
@ -86,7 +86,7 @@ impl<'ast> Grammar<'ast> {
|
||||
// and maintain a global cache of program strings during the compilation process.
|
||||
/// Loads the Leo code as a string from the given file path.
|
||||
pub fn load_file(file_path: &'ast Path) -> Result<String, ParserError> {
|
||||
Ok(fs::read_to_string(file_path).map_err(|_| ParserError::FileReadError(file_path.to_owned()))?)
|
||||
fs::read_to_string(file_path).map_err(|_| ParserError::FileReadError(file_path.to_owned()))
|
||||
}
|
||||
|
||||
/// Returns a reference to the inner abstract syntax tree representation.
|
||||
|
@ -41,7 +41,7 @@ pub struct LeoInputParser;
|
||||
impl LeoInputParser {
|
||||
/// Reads in the given file path into a string.
|
||||
pub fn load_file(file_path: &Path) -> Result<String, InputParserError> {
|
||||
Ok(fs::read_to_string(file_path).map_err(|_| InputParserError::FileReadError(file_path.to_owned()))?)
|
||||
fs::read_to_string(file_path).map_err(|_| InputParserError::FileReadError(file_path.to_owned()))
|
||||
}
|
||||
|
||||
/// Parses the input file and constructs a syntax tree.
|
||||
|
Loading…
Reference in New Issue
Block a user