cargo +nightly clippy

This commit is contained in:
collin 2021-01-19 12:43:09 -05:00 committed by gluaxspeed
parent fe88b73f82
commit 873fcc9637
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.