Skip to content

Commit 94c8751

Browse files
committed
Make no_std compliant
1 parent 2203776 commit 94c8751

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/ast/value.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use alloc::string::String;
2020

2121
use core::fmt;
22-
use std::fmt::Write;
2322

2423
#[cfg(feature = "bigdecimal")]
2524
use bigdecimal::BigDecimal;
@@ -307,12 +306,8 @@ pub struct QuoteDelimitedString {
307306
}
308307

309308
impl fmt::Display for QuoteDelimitedString {
310-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
311-
f.write_str("Q'")?;
312-
f.write_char(self.start_quote)?;
313-
f.write_str(&self.value)?;
314-
f.write_char(self.end_quote)?;
315-
f.write_char('\'')
309+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
310+
write!(f, "Q'{}{}{}'", self.start_quote, self.value, self.end_quote)
316311
}
317312
}
318313

0 commit comments

Comments
 (0)