mirror of
https://github.com/Noratrieb/mono-fmt.git
synced 2026-01-14 15:25:08 +01:00
fmt
This commit is contained in:
parent
505a8f80d5
commit
166b495586
5 changed files with 19 additions and 15 deletions
3
.rustfmt.toml
Normal file
3
.rustfmt.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
imports_granularity = "Crate"
|
||||
newline_style = "Unix"
|
||||
group_imports = "StdExternalCrate"
|
||||
16
src/lib.rs
16
src/lib.rs
|
|
@ -12,8 +12,7 @@ macro_rules! format_args {
|
|||
};
|
||||
}
|
||||
|
||||
pub use crate::args::Arguments;
|
||||
pub use crate::opts::FmtOpts;
|
||||
pub use crate::{args::Arguments, opts::FmtOpts};
|
||||
|
||||
pub type Result = std::result::Result<(), Error>;
|
||||
|
||||
|
|
@ -118,13 +117,14 @@ pub fn format<A: Arguments>(args: A) -> String {
|
|||
/// Not part of the public API.
|
||||
#[doc(hidden)]
|
||||
mod _private {
|
||||
pub use crate::args::{ConstWidthArg, DebugArg, DisplayArg, Str};
|
||||
|
||||
pub use crate::opts::{
|
||||
WithAlternate, WithCenterAlign, WithFill, WithLeftAlign, WithRightAlign, WithWidth,
|
||||
};
|
||||
|
||||
pub use mono_fmt_macro::__format_args;
|
||||
|
||||
pub use crate::{
|
||||
args::{ConstWidthArg, DebugArg, DisplayArg, Str},
|
||||
opts::{
|
||||
WithAlternate, WithCenterAlign, WithFill, WithLeftAlign, WithRightAlign, WithWidth,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Copied modified stuff from core
|
||||
|
||||
mod num;
|
||||
mod formatter;
|
||||
mod num;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
//! Integer and floating-point number formatting
|
||||
|
||||
use std::{
|
||||
mem::MaybeUninit,
|
||||
ops::{Div, Rem, Sub},
|
||||
ptr, slice, str,
|
||||
};
|
||||
|
||||
use crate::{self as fmt, FmtOpts, Write};
|
||||
use std::mem::MaybeUninit;
|
||||
use std::ops::{Div, Rem, Sub};
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
use std::str;
|
||||
|
||||
mod numfmt {
|
||||
//! Shared utilities used by both float and integer formatting.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue