Skip to content

Commit ef6931b

Browse files
committed
Add clarifying comment
1 parent 4457888 commit ef6931b

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

crates/next-custom-transforms/src/transforms/server_actions.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{
22
cell::RefCell,
3-
collections::{hash_map, BTreeMap},
3+
collections::{BTreeMap, hash_map},
44
convert::{TryFrom, TryInto},
55
mem::{replace, take},
66
path::{Path, PathBuf},
@@ -16,23 +16,23 @@ use rustc_hash::{FxHashMap, FxHashSet};
1616
use serde::Deserialize;
1717
use sha1::{Digest, Sha1};
1818
use swc_core::{
19-
atoms::{atom, Atom},
19+
atoms::{Atom, atom},
2020
common::{
21+
BytePos, DUMMY_SP, FileName, Mark, SourceMap, Span, SyntaxContext,
2122
comments::{Comment, CommentKind, Comments, SingleThreadedComments},
2223
errors::HANDLER,
23-
source_map::{SourceMapGenConfig, PURE_SP},
24+
source_map::{PURE_SP, SourceMapGenConfig},
2425
util::take::Take,
25-
BytePos, FileName, Mark, SourceMap, Span, SyntaxContext, DUMMY_SP,
2626
},
2727
ecma::{
2828
ast::*,
29-
codegen::{self, text_writer::JsWriter, Emitter},
30-
utils::{private_ident, quote_ident, ExprFactory},
31-
visit::{noop_visit_mut_type, visit_mut_pass, VisitMut, VisitMutWith},
29+
codegen::{self, Emitter, text_writer::JsWriter},
30+
utils::{ExprFactory, private_ident, quote_ident},
31+
visit::{VisitMut, VisitMutWith, noop_visit_mut_type, visit_mut_pass},
3232
},
3333
quote,
3434
};
35-
use turbo_rcstr::{rcstr, RcStr};
35+
use turbo_rcstr::{RcStr, rcstr};
3636

3737
use crate::FxIndexMap;
3838

@@ -249,7 +249,11 @@ struct ServerActions<C: Comments> {
249249
annotations: Vec<Stmt>,
250250
extra_items: Vec<ModuleItem>,
251251
hoisted_extra_items: Vec<ModuleItem>,
252+
253+
// A map of all server references (inline + exported): export_name -> reference_id
252254
reference_ids_by_export_name: FxIndexMap<Atom, Atom>,
255+
256+
// A list of server references for originally exported server functions only.
253257
server_reference_exports: Vec<ServerReferenceExport>,
254258

255259
private_ctxt: SyntaxContext,

0 commit comments

Comments
 (0)