Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions crates/cairo-lang-filesystem/src/ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ impl<'db> SmolStrId<'db> {
SmolStrId::new(db, content.into())
}

pub fn from_arcstr(db: &'db dyn Database, content: &Arc<str>) -> Self {
SmolStrId::from(db, content.clone())
}

pub fn to_string(&self, db: &dyn Database) -> String {
self.long(db).to_string()
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-semantic/src/expr/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ fn expand_macro_for_statement<'db>(
let new_file_long_id = FileLongId::Virtual(VirtualFile {
parent: Some(syntax.stable_ptr(ctx.db).untyped().span_in_file(ctx.db)),
name: SmolStrId::from(ctx.db, name),
content: SmolStrId::from_arcstr(ctx.db, &content),
content: SmolStrId::from(ctx.db, content.as_ref()),
code_mappings: info.mappings.clone(),
kind: FileKind::StatementList,
original_item_removed: true,
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-semantic/src/items/macro_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn priv_macro_call_data<'db>(
let generated_file_long_id = FileLongId::Virtual(VirtualFile {
parent: Some(macro_call_syntax.stable_ptr(db).untyped().span_in_file(db)),
name: macro_name,
content: SmolStrId::from_arcstr(db, &expanded_code.text),
content: SmolStrId::from(db, expanded_code.text.as_ref()),
code_mappings: expanded_code.code_mappings.clone(),
kind: FileKind::Module,
original_item_removed: false,
Expand Down