From 39fc23cf9290904283670b36b272863fa3479358 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Wed, 22 Feb 2023 17:28:49 +0900 Subject: [PATCH] relocate feature-independent use --- ast/src/constant.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ast/src/constant.rs b/ast/src/constant.rs index 54aa759..55ee09a 100644 --- a/ast/src/constant.rs +++ b/ast/src/constant.rs @@ -1,5 +1,3 @@ -use std::fmt::Error; - use num_bigint::BigInt; pub use rustpython_compiler_core::ConversionFlag; @@ -44,7 +42,9 @@ impl std::fmt::Display for Constant { Constant::None => f.pad("None"), Constant::Bool(b) => f.pad(if *b { "True" } else { "False" }), Constant::Str(s) => rustpython_common::str::repr(s).fmt(f), - Constant::Bytes(b) => f.pad(&rustpython_common::bytes::repr(b).map_err(|_err| Error)?), + Constant::Bytes(b) => { + f.pad(&rustpython_common::bytes::repr(b).map_err(|_err| std::fmt::Error)?) + } Constant::Int(i) => i.fmt(f), Constant::Tuple(tup) => { if let [elt] = &**tup {