Fix bug.
This commit is contained in:
parent
ca02d46a49
commit
675a45fac7
@ -10,6 +10,7 @@ Bug fixes
|
||||
* Complex indexing/dotting chains now parse correctly, for example: `a[b][c[d]].e`
|
||||
* `map` and `filter` for arrays are marked `pure`. Warnings are added to the documentation of pure array methods that take `this` closures.
|
||||
* Syntax such as `foo.bar::baz` no longer panics, but returns a proper parse error.
|
||||
* `x += y` where `x` and `y` are `char` now works correctly.
|
||||
|
||||
|
||||
Version 1.12.0
|
||||
|
@ -10,9 +10,9 @@ use crate::{
|
||||
Dynamic, ExclusiveRange, ImmutableString, InclusiveRange, NativeCallContext, RhaiResult,
|
||||
SmartString, INT,
|
||||
};
|
||||
use std::any::TypeId;
|
||||
#[cfg(feature = "no_std")]
|
||||
use std::prelude::v1::*;
|
||||
use std::{any::TypeId, fmt::Write};
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use crate::FLOAT;
|
||||
@ -753,7 +753,7 @@ pub fn get_builtin_op_assignment_fn(op: Token, x: &Dynamic, y: &Dynamic) -> Opti
|
||||
let x = &mut *args[0].write_lock::<Dynamic>().unwrap();
|
||||
|
||||
let mut buf = SmartString::new_const();
|
||||
write!(&mut buf, "{y}").unwrap();
|
||||
buf.push(x.as_char().unwrap());
|
||||
buf.push(y);
|
||||
|
||||
Ok((*x = buf.into()).into())
|
||||
|
Loading…
Reference in New Issue
Block a user