mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 04:44:44 +00:00
Add AtomicStr
This commit is contained in:
parent
fb36c0d633
commit
fe1b0fab70
11 changed files with 300 additions and 105 deletions
|
@ -17,6 +17,7 @@ use std::fmt;
|
|||
use std::mem;
|
||||
use std::option::Option; // conflicting to Type::Option
|
||||
|
||||
use erg_common::astr::AtomicStr;
|
||||
use erg_common::dict::Dict;
|
||||
use erg_common::error::Location;
|
||||
use erg_common::impl_display_from_debug;
|
||||
|
@ -476,8 +477,8 @@ impl Context {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn caused_by(&self) -> Str {
|
||||
self.name.clone()
|
||||
pub fn caused_by(&self) -> AtomicStr {
|
||||
AtomicStr::arc(&self.name[..])
|
||||
}
|
||||
|
||||
pub(crate) fn grow(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue