aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-18 17:09:26 -0700
committeriximeow <me@iximeow.net>2024-06-18 17:09:26 -0700
commit514586f65bf493b5b48aaf7208f9b381b9293eb7 (patch)
tree58053ba119213369a0a91b8915727e1e581d8a48 /src/long_mode/display.rs
parentbebba5add1ea460db29cd0268f3365fae3cabbdd (diff)
write_fixed_size really should always be inlined...
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r--src/long_mode/display.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index 6d3be36..99d4f91 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -371,6 +371,7 @@ pub enum TokenType {
}
pub trait DisplaySink: fmt::Write {
+ #[inline(always)]
fn write_fixed_size(&mut self, s: &str) -> Result<(), core::fmt::Error> {
self.write_str(s)
}
@@ -493,6 +494,7 @@ impl fmt::Write for BigEnoughString {
// TODO: delete this whole thing? maybe?
impl DisplaySink for alloc::string::String {
+ #[inline(always)]
fn write_fixed_size(&mut self, s: &str) -> Result<(), core::fmt::Error> {
self.reserve(s.len());
let buf = unsafe { self.as_mut_vec() };
@@ -787,6 +789,7 @@ impl DisplaySink for alloc::string::String {
}
impl DisplaySink for BigEnoughString {
+ #[inline(always)]
fn write_fixed_size(&mut self, s: &str) -> Result<(), core::fmt::Error> {
let buf = unsafe { self.content.as_mut_vec() };
let new_bytes = s.as_bytes();