MCPcopy Index your code
hub / github.com/RustPython/RustPython / format_int_radix

Method format_int_radix

crates/common/src/format.rs:760–765  ·  view source on GitHub ↗
(&self, magnitude: BigInt, radix: u32)

Source from the content-addressed store, hash-verified

758
759 #[inline]
760 fn format_int_radix(&self, magnitude: BigInt, radix: u32) -> Result<String, FormatSpecError> {
761 match self.precision {
762 Some(_) => Err(FormatSpecError::PrecisionNotAllowed),
763 None => Ok(magnitude.to_str_radix(radix)),
764 }
765 }
766
767 pub fn format_int(&self, num: &BigInt) -> Result<String, FormatSpecError> {
768 self.validate_format(FormatType::Decimal)?;

Callers 2

format_int_localeMethod · 0.80
format_intMethod · 0.80

Calls 1

ErrClass · 0.50

Tested by

no test coverage detected