Skip to content

Commit

Permalink
Revert "keep closer to original impl"
Browse files Browse the repository at this point in the history
This reverts commit 51e5a76.
  • Loading branch information
bananaturtlesandwich committed Dec 15, 2022
1 parent 51e5a76 commit b9f9632
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/fixed_collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,20 @@ pub trait IString {

fn append_real(&mut self, fmt: &str, v: f32) {
assert!(self.capacity() - self.len() >= 32);
for ch in sprintf::sprintf!(fmt, v).unwrap_or_default().as_bytes() {
for ch in sprintf::sprintf!(fmt, v).unwrap_or_default().chars() {
match ch {
0 => break,
_ => self.push(*ch as char),
'\0' => break,
_ => self.push(ch),
}
}
}

fn append_int(&mut self, fmt: &str, v: i32) {
assert!(self.capacity() - self.len() >= 32);
for ch in sprintf::sprintf!(fmt, v).unwrap_or_default().as_bytes() {
for ch in sprintf::sprintf!(fmt, v).unwrap_or_default().chars() {
match ch {
0 => break,
_ => self.push(*ch as char),
'\0' => break,
_ => self.push(ch),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ fn hash_bytes(hash_0: &mut Id, s: &[u8]) {
impl Context {
pub fn new() -> Self {
let mut s = Self::default();
s.draw_frame = Some(draw_frame);
s.draw_frame = Some(draw_frame as fn(&mut Context, Rect, ControlColor) -> ());
s.style = Style::default();
s
}
Expand Down

0 comments on commit b9f9632

Please sign in to comment.