Switched over substr and trim functions in str to be non-allocating, temporary renamed them to better track use-sites
This commit is contained in:
parent
ed25a674ac
commit
ee2f3d9673
18 changed files with 130 additions and 124 deletions
|
|
@ -325,7 +325,7 @@ pub mod ct {
|
|||
'o' as u8 => TyOctal,
|
||||
'f' as u8 => TyFloat,
|
||||
'?' as u8 => TyPoly,
|
||||
_ => err(~"unknown type in conversion: " + s.substr(i, 1))
|
||||
_ => err(~"unknown type in conversion: " + s.substr_DBGBRWD(i, 1))
|
||||
};
|
||||
|
||||
Parsed::new(t, i + 1)
|
||||
|
|
@ -537,7 +537,7 @@ pub mod rt {
|
|||
let mut unpadded = match cv.precision {
|
||||
CountImplied => s.to_owned(),
|
||||
CountIs(max) => if (max as uint) < str::char_len(s) {
|
||||
str::substr(s, 0, max as uint)
|
||||
str::substr_DBGBRWD(s, 0, max as uint).to_owned()
|
||||
} else {
|
||||
s.to_owned()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue