mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-09 22:25:23 +00:00
relocate feature-independent use
This commit is contained in:
parent
66e3080173
commit
39fc23cf92
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue