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
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
#![allow(clippy::from_over_into)]
#[macro_use]
extern crate thiserror;

View File

@ -102,7 +102,7 @@ impl FromAst<leo_ast::AssignStatement> for Arc<Statement> {
.as_ref()
.map(
|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()?;
@ -110,7 +110,7 @@ impl FromAst<leo_ast::AssignStatement> for Arc<Statement> {
.as_ref()
.map(
|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()?;

View File

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