Merge pull request #573 from AleoHQ/asg-clippy

cargo +nightly clippy
This commit is contained in:
Collin Chin 2021-01-29 14:14:02 -05:00 committed by GitHub
commit 9541e124f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>. // along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
#![allow(clippy::from_over_into)]
#[macro_use] #[macro_use]
extern crate thiserror; extern crate thiserror;

View File

@ -102,7 +102,7 @@ impl FromAst<leo_ast::AssignStatement> for Arc<Statement> {
.as_ref() .as_ref()
.map( .map(
|left: &leo_ast::Expression| -> Result<Arc<Expression>, AsgConvertError> { |left: &leo_ast::Expression| -> Result<Arc<Expression>, AsgConvertError> {
Ok(Arc::<Expression>::from_ast(scope, left, index_type.clone())?) Arc::<Expression>::from_ast(scope, left, index_type.clone())
}, },
) )
.transpose()?; .transpose()?;
@ -110,7 +110,7 @@ impl FromAst<leo_ast::AssignStatement> for Arc<Statement> {
.as_ref() .as_ref()
.map( .map(
|right: &leo_ast::Expression| -> Result<Arc<Expression>, AsgConvertError> { |right: &leo_ast::Expression| -> Result<Arc<Expression>, AsgConvertError> {
Ok(Arc::<Expression>::from_ast(scope, right, index_type)?) Arc::<Expression>::from_ast(scope, right, index_type)
}, },
) )
.transpose()?; .transpose()?;

View File

@ -46,9 +46,7 @@ impl FromAst<leo_ast::ConditionalStatement> for ConditionalStatement {
let next = statement let next = statement
.next .next
.as_deref() .as_deref()
.map(|next| -> Result<Arc<Statement>, AsgConvertError> { .map(|next| -> Result<Arc<Statement>, AsgConvertError> { Arc::<Statement>::from_ast(scope, next, None) })
Ok(Arc::<Statement>::from_ast(scope, next, None)?)
})
.transpose()?; .transpose()?;
Ok(ConditionalStatement { Ok(ConditionalStatement {