Skip to content

Commit 39fc23c

Browse files
committed
relocate feature-independent use
1 parent 66e3080 commit 39fc23c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎ast/src/constant.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::fmt::Error;
2-
31
use num_bigint::BigInt;
42
pub use rustpython_compiler_core::ConversionFlag;
53

@@ -44,7 +42,9 @@ impl std::fmt::Display for Constant {
4442
Constant::None => f.pad("None"),
4543
Constant::Bool(b) => f.pad(if *b { "True" } else { "False" }),
4644
Constant::Str(s) => rustpython_common::str::repr(s).fmt(f),
47-
Constant::Bytes(b) => f.pad(&rustpython_common::bytes::repr(b).map_err(|_err| Error)?),
45+
Constant::Bytes(b) => {
46+
f.pad(&rustpython_common::bytes::repr(b).map_err(|_err| std::fmt::Error)?)
47+
}
4848
Constant::Int(i) => i.fmt(f),
4949
Constant::Tuple(tup) => {
5050
if let [elt] = &**tup {

0 commit comments

Comments
 (0)