Use write_str.
This commit is contained in:
parent
e35122ae5d
commit
3371eed411
@ -1776,7 +1776,7 @@ impl fmt::Debug for Expr {
|
||||
Some((_, ref namespace)) => write!(f, "{}", namespace)?,
|
||||
_ => (),
|
||||
}
|
||||
write!(f, "{}", x.2)?;
|
||||
f.write_str(&x.2)?;
|
||||
match i.map_or_else(|| x.0, |n| NonZeroUsize::new(n.get() as usize)) {
|
||||
Some(n) => write!(f, ", {}", n)?,
|
||||
_ => (),
|
||||
|
@ -692,7 +692,7 @@ impl fmt::Debug for Dynamic {
|
||||
return fmt::Debug::fmt(_value_any.downcast_ref::<i128>().expect(CHECKED), f);
|
||||
}
|
||||
|
||||
write!(f, "{}", value.type_name())
|
||||
f.write_str(value.type_name())
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
|
@ -172,7 +172,7 @@ impl fmt::Display for EvalAltResult {
|
||||
|
||||
Self::ErrorModuleNotFound(s, _) => write!(f, "{}: '{}'", desc, s)?,
|
||||
|
||||
Self::ErrorDotExpr(s, _) if !s.is_empty() => write!(f, "{}", s)?,
|
||||
Self::ErrorDotExpr(s, _) if !s.is_empty() => f.write_str(s)?,
|
||||
|
||||
Self::ErrorIndexingType(s, _) => write!(f, "Indexer not registered for type '{}'", s)?,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user